@@ -76,7 +76,7 @@ The <code>FontFace</code> Interface</h2>
76
76
CSS ''@font-face'' rules implicitly define FontFace objects,
77
77
or they can be constructed manually from a url or binary data.
78
78
79
- <pre class="idl">
79
+ <xmp class="idl">
80
80
typedef (ArrayBuffer or ArrayBufferView) BinaryData;
81
81
82
82
dictionary FontFaceDescriptors {
@@ -92,10 +92,10 @@ The <code>FontFace</code> Interface</h2>
92
92
93
93
enum FontFaceLoadStatus { "unloaded", "loading", "loaded", "error" };
94
94
95
- [Constructor(CSSOMString family, (CSSOMString or BinaryData) source,
96
- optional FontFaceDescriptors descriptors),
97
- Exposed=(Window,Worker)]
95
+ [Exposed=(Window,Worker)]
98
96
interface FontFace {
97
+ constructor(CSSOMString family, (CSSOMString or BinaryData) source,
98
+ optional FontFaceDescriptors descriptors);
99
99
attribute CSSOMString family;
100
100
attribute CSSOMString style;
101
101
attribute CSSOMString weight;
@@ -108,10 +108,10 @@ The <code>FontFace</code> Interface</h2>
108
108
109
109
readonly attribute FontFaceLoadStatus status;
110
110
111
- Promise< FontFace> load();
112
- readonly attribute Promise< FontFace> loaded;
111
+ Promise< FontFace> load();
112
+ readonly attribute Promise< FontFace> loaded;
113
113
};
114
- </pre >
114
+ </xmp >
115
115
116
116
Issue: Clarify all mentions of "the document" to be clear about which document is being referenced,
117
117
since objects can move between documents.
@@ -430,26 +430,27 @@ Interaction with CSS’s ''@font-face'' Rule</h3>
430
430
<h2 id="FontFaceSet-interface">
431
431
The <code>FontFaceSet</code> Interface</h2>
432
432
433
- <pre class="idl">
433
+ <xmp class="idl">
434
434
dictionary FontFaceSetLoadEventInit : EventInit {
435
- sequence< FontFace> fontfaces = [];
435
+ sequence< FontFace> fontfaces = [];
436
436
};
437
437
438
- [Constructor(CSSOMString type, optional FontFaceSetLoadEventInit eventInitDict),
439
- Exposed=(Window,Worker)]
438
+ [Exposed=(Window,Worker)]
440
439
interface FontFaceSetLoadEvent : Event {
441
- [SameObject] readonly attribute FrozenArray<FontFace> fontfaces;
440
+ constructor(CSSOMString type, optional FontFaceSetLoadEventInit eventInitDict);
441
+ [SameObject] readonly attribute FrozenArray<FontFace> fontfaces;
442
442
};
443
443
444
444
enum FontFaceSetLoadStatus { "loading", "loaded" };
445
445
446
446
callback ForEachCallback = void (FontFace font, long index, FontFaceSet self);
447
447
448
- [Exposed=(Window,Worker),
449
- Constructor(sequence<FontFace> initialFaces)]
448
+ [Exposed=(Window,Worker)]
450
449
interface FontFaceSet : EventTarget {
450
+ constructor(sequence<FontFace> initialFaces);
451
+
451
452
// FontFaceSet is Set-like!
452
- setlike< FontFace>;
453
+ setlike< FontFace>;
453
454
FontFaceSet add(FontFace font);
454
455
boolean delete(FontFace font);
455
456
void clear();
@@ -461,19 +462,19 @@ The <code>FontFaceSet</code> Interface</h2>
461
462
462
463
// check and start loads if appropriate
463
464
// 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 = " ");
465
466
466
467
// return whether all fonts in the fontlist are loaded
467
468
// (does not initiate load if not available)
468
469
boolean check(CSSOMString font, optional CSSOMString text = " ");
469
470
470
471
// async notification that font loading and layout operations are done
471
- readonly attribute Promise< FontFaceSet> ready;
472
+ readonly attribute Promise< FontFaceSet> ready;
472
473
473
474
// loading state, "loading" while one or more fonts loading, "loaded" otherwise
474
475
readonly attribute FontFaceSetLoadStatus status;
475
476
};
476
- </pre >
477
+ </xmp >
477
478
478
479
{{FontFaceSet/load()}}
479
480
0 commit comments