Browse Source

set FontFace prototype

Gildas 2 years ago
parent
commit
f12ed0c00d

+ 1 - 0
src/lib/single-file/core/content/content-hooks-frames-inline-injection.js

@@ -73,6 +73,7 @@ function injectedScript() {
 			return new FontFace(...arguments);
 		};
 		globalThis.FontFace.toString = function () { return "function FontFace() { [native code] }"; };
+		globalThis.FontFace.prototype = FontFace.prototype;
 		const deleteFont = document.fonts.delete;
 		document.fonts.delete = function (fontFace) {
 			getDetailObject(fontFace.family).then(detail => dispatchEvent(new CustomEvent(DELETE_FONT_EVENT, { detail })));