@@ -76,7 +76,7 @@ The <code>FontFace</code> Interface</h2>
7676 CSS ''@font-face'' rules implicitly define FontFace objects,
7777 or they can be constructed manually from a url or binary data.
7878
79- <pre class="idl">
79+ <xmp class="idl">
8080 typedef (ArrayBuffer or ArrayBufferView) BinaryData;
8181
8282 dictionary FontFaceDescriptors {
@@ -92,10 +92,10 @@ The <code>FontFace</code> Interface</h2>
9292
9393 enum FontFaceLoadStatus { "unloaded", "loading", "loaded", "error" };
9494
95- [Constructor(CSSOMString family, (CSSOMString or BinaryData) source,
96- optional FontFaceDescriptors descriptors),
97- Exposed=(Window,Worker)]
95+ [Exposed=(Window,Worker)]
9896 interface FontFace {
97+ constructor(CSSOMString family, (CSSOMString or BinaryData) source,
98+ optional FontFaceDescriptors descriptors);
9999 attribute CSSOMString family;
100100 attribute CSSOMString style;
101101 attribute CSSOMString weight;
@@ -108,10 +108,10 @@ The <code>FontFace</code> Interface</h2>
108108
109109 readonly attribute FontFaceLoadStatus status;
110110
111- Promise< FontFace> load();
112- readonly attribute Promise< FontFace> loaded;
111+ Promise< FontFace> load();
112+ readonly attribute Promise< FontFace> loaded;
113113 };
114- </pre >
114+ </xmp >
115115
116116 Issue: Clarify all mentions of "the document" to be clear about which document is being referenced,
117117 since objects can move between documents.
@@ -430,26 +430,27 @@ Interaction with CSS’s ''@font-face'' Rule</h3>
430430<h2 id="FontFaceSet-interface">
431431The <code>FontFaceSet</code> Interface</h2>
432432
433- <pre class="idl">
433+ <xmp class="idl">
434434 dictionary FontFaceSetLoadEventInit : EventInit {
435- sequence< FontFace> fontfaces = [];
435+ sequence< FontFace> fontfaces = [];
436436 };
437437
438- [Constructor(CSSOMString type, optional FontFaceSetLoadEventInit eventInitDict),
439- Exposed=(Window,Worker)]
438+ [Exposed=(Window,Worker)]
440439 interface FontFaceSetLoadEvent : Event {
441- [SameObject] readonly attribute FrozenArray<FontFace> fontfaces;
440+ constructor(CSSOMString type, optional FontFaceSetLoadEventInit eventInitDict);
441+ [SameObject] readonly attribute FrozenArray<FontFace> fontfaces;
442442 };
443443
444444 enum FontFaceSetLoadStatus { "loading", "loaded" };
445445
446446 callback ForEachCallback = void (FontFace font, long index, FontFaceSet self);
447447
448- [Exposed=(Window,Worker),
449- Constructor(sequence<FontFace> initialFaces)]
448+ [Exposed=(Window,Worker)]
450449 interface FontFaceSet : EventTarget {
450+ constructor(sequence<FontFace> initialFaces);
451+
451452 // FontFaceSet is Set-like!
452- setlike< FontFace>;
453+ setlike< FontFace>;
453454 FontFaceSet add(FontFace font);
454455 boolean delete(FontFace font);
455456 void clear();
@@ -461,19 +462,19 @@ The <code>FontFaceSet</code> Interface</h2>
461462
462463 // check and start loads if appropriate
463464 // and fulfill promise when all loads complete
464- Promise< sequence< FontFace>> load(CSSOMString font, optional CSSOMString text = " ");
465+ Promise< sequence< FontFace> > load(CSSOMString font, optional CSSOMString text = " ");
465466
466467 // return whether all fonts in the fontlist are loaded
467468 // (does not initiate load if not available)
468469 boolean check(CSSOMString font, optional CSSOMString text = " ");
469470
470471 // async notification that font loading and layout operations are done
471- readonly attribute Promise< FontFaceSet> ready;
472+ readonly attribute Promise< FontFaceSet> ready;
472473
473474 // loading state, "loading" while one or more fonts loading, "loaded" otherwise
474475 readonly attribute FontFaceSetLoadStatus status;
475476 };
476- </pre >
477+ </xmp >
477478
478479 {{FontFaceSet/load()}}
479480
0 commit comments