v150 · Fonts · Web APIs · demo
FontFaceSet Migration
Chrome 150 removes [LegacyNoInterfaceObject] from FontFaceSet's IDL, making it constructible: new FontFaceSet([]) now works. Explore the before/after patterns, Worker font loading, and the full interface.
Live probe
Before / After
FontFaceSet had [LegacyNoInterfaceObject] in its IDL — it was never exposed as a global constructor. You could only reach a FontFaceSet via document.fonts.
[LegacyNoInterfaceObject] is removed. FontFaceSet is now a real constructible interface exposed as a global.
Live demo — FontFaceSet constructor
Interface comparison
| Member | Type | Before Chrome 150 | Chrome 150+ |
|---|---|---|---|
| FontFaceSet global | constructor | undefined (LegacyNoInterfaceObject) | function FontFaceSet() |
| new FontFaceSet(iterable) | constructor call | TypeError | Returns FontFaceSet instance |
| .add(font) | method | document.fonts.add() only | any FontFaceSet instance |
| .delete(font) | method | document.fonts.delete() only | any FontFaceSet instance |
| .clear() | method | document.fonts.clear() only | any FontFaceSet instance |
| .has(font) | method | document.fonts.has() only | any FontFaceSet instance |
| .load(font, text) | method → Promise | document.fonts.load() only | any FontFaceSet instance |
| .ready | Promise property | document.fonts.ready only | any FontFaceSet instance |
| in Workers | availability | Not available | Available via WorkerGlobalScope.fonts |
Worker font loading use case
With FontFaceSet constructible, a Worker can now create and manage its own font sets — useful for OffscreenCanvas rendering or server-side text metric computation.
see also
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗