Skip to content

Commit ddf821d

Browse files
committed
[css-font-loading] Tweak the example to use the resolved value.
1 parent d8078d6 commit ddf821d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

css-font-loading/Overview.bs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,8 @@ Interaction with CSS Font Loading and Matching</h3>
704704

705705
<pre>
706706
var f = new FontFace("newfont", "url(newfont.woff)", {});
707-
f.load().then(function () {
708-
document.fonts.add(f);
707+
f.load().then(function (loadedFace) {
708+
document.fonts.add(loadedFace);
709709
document.body.style.fontFamily = "newfont, serif";
710710
});
711711
</pre>

css-font-loading/Overview.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -790,8 +790,8 @@ <h3 class="heading settled heading" data-level=3.6 id=font-face-set-css><span cl
790790
authors can defer the addition of a new <a data-link-type=idl href=#dom-fontface title=fontface>FontFace</a> to a <a data-link-type=idl href=#dom-fontfaceset title=fontfaceset>FontFaceSet</a> until the load has completed:
791791

792792
<pre>var f = new FontFace("newfont", "url(newfont.woff)", {});
793-
f.load().then(function () {
794-
document.fonts.add(f);
793+
f.load().then(function (loadedFace) {
794+
document.fonts.add(loadedFace);
795795
document.body.style.fontFamily = "newfont, serif";
796796
});
797797
</pre>

0 commit comments

Comments
 (0)