Skip to content

Commit

Permalink
Add missing loadScript implementation to font-inspector.html
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianheine authored Apr 30, 2024
1 parent c6a3cb8 commit f4bcade
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/font-inspector.html
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ <h1>Free Software</h1>
}

const form = document.forms.demo;
const loadScript = (src) => new Promise((onload) => document.documentElement.append(
Object.assign(document.createElement('script'), {src, onload})
));
async function display(file, name) {
form.fontname.innerText = name;
const isWoff2 = name.endsWith('.woff2');
Expand Down

0 comments on commit f4bcade

Please sign in to comment.