demo · v150
Worker Exposure
The CSS Font Loading spec marks FontFaceSet as [Exposed=(Window,Worker)]. This page runs the idlharness-style probes in both contexts and surfaces the result — a real read of whether the worker-side global exposure matches the window-side fix.
// Spec IDL — what we're verifying:
[Exposed=(Window,Worker)]
interface FontFaceSet : EventTarget {
// ...
};
// Window-side check
typeof FontFaceSet === "function"; // true (v150+)
// Worker-side check
new Worker(URL.createObjectURL(new Blob([`
postMessage({
typeofFFS: typeof FontFaceSet,
inSelf: "FontFaceSet" in self,
});
`])));
why this matters
Before the fix, FontFaceSet was a hidden interface on window and on worker globals: "FontFaceSet" in self returned false even though instances clearly existed (via self.fonts). The WPT idlharness tests had 18 failures from this. Workers in particular suffered because feature-detection libraries had no way to ask "is this real" without poking at an instance — which itself could be missing in certain worker types.
see also
- Remove [LegacyNoInterfaceObject] from FontFaceSet IDL — feature index
- FontFaceSet Probe — companion demo
- ChromeStatus entry
- CSS Font Loading FontFaceSet
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗