Skip to content

Commit f4bcade

Browse files
authored
Add missing loadScript implementation to font-inspector.html
1 parent c6a3cb8 commit f4bcade

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/font-inspector.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,9 @@ <h1>Free Software</h1>
288288
}
289289

290290
const form = document.forms.demo;
291+
const loadScript = (src) => new Promise((onload) => document.documentElement.append(
292+
Object.assign(document.createElement('script'), {src, onload})
293+
));
291294
async function display(file, name) {
292295
form.fontname.innerText = name;
293296
const isWoff2 = name.endsWith('.woff2');

0 commit comments

Comments
 (0)