Contact emails
Specification
Summary
Chromium's FontFaceSet IDL previously used [LegacyNoInterfaceObject], which hid FontFaceSet as a global property and deleted the constructor property from its prototype. This deviated from the CSS Font Loading spec and differed from Safari and Firefox behavior.
This change removes [LegacyNoInterfaceObject] from the FontFaceSet IDL, so FontFaceSet is properly exposed as a global property. Since no constructor() is defined in the IDL, calling new FontFaceSet() from JavaScript now throws TypeError: Illegal constructor,
matching the spec. This also fixes the historical.html WPT, which was previously failing in Chromium.
Blink component
Web Feature ID
Risks
Interoperability and Compatibility
This change removes [LegacyNoInterfaceObject] from FontFaceSet. The IDL retains [Exposed=(Window,Worker)] and defines no constructor. This aligns Chromium with the CSS Font Loading spec (per CSSWG resolution w3c/csswg-drafts#10390), with Firefox and WebKit.
Observable changes for web content:
1. FontFaceSet is exposed as a property of Window and Worker globals: typeof FontFaceSet changes from "undefined" to "function", and "FontFaceSet" in self changes from false to true.
2. new FontFaceSet(...) throws TypeError: Illegal constructor; previously it threw ReferenceError: FontFaceSet is not defined.
3. document.fonts.constructor returns FontFaceSet; previously prototype-chain traversal reached EventTarget because [LegacyNoInterfaceObject] removed FontFaceSet.prototype.constructor. As a consequence, new document.fonts.constructor(...) previously constructed
an EventTarget and now throws TypeError: Illegal constructor.
Compatibility risk is low.
No pre-change code path in Chromium produced a FontFaceSet instance: the literal new FontFaceSet(...) threw ReferenceError, and the prototype-walk path new document.fonts.constructor(...) produced an EventTarget. Access to the existing FontFaceSet instance
via document.fonts is unchanged. The historical.html WPT and 18 FontFaceSet sub-tests in css/css-font-loading/idlharness.https.html move from failing to passing.
Gecko: Shipped/Shipping
Firefox has long exposed FontFaceSet as a global without a constructor.
WebKit: Shipped/Shipping
Web developers: No signals
Security
Low risk.
No new APIs, no new attack surface, and no changes to cross-origin behavior or font loading lifecycle.
Debuggability
No changes to DevTools.
Existing behavior (TypeError for constructor usage) remains unchanged and debuggable.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
Yes
Supported uniformly across all platforms.
Tracking bug
Estimated milestones
|
Shipping on desktop
|
151
|
|
Shipping on Android
|
151
|
|
Shipping on WebView
|
151
|
|
Shipping on iOS
|
151
|
Link to entry on the Chrome Platform Status