Inline fonts for ForeignObjectRenderer

This commit is contained in:
Niklas von Hertzen
2017-10-18 20:34:17 +08:00
parent f16d581f04
commit 9445b0b598
12 changed files with 234 additions and 104 deletions

View File

@@ -146,7 +146,10 @@ const FEATURES = {
// $FlowFixMe - get/set properties not yet supported
get SUPPORT_FOREIGNOBJECT_DRAWING() {
'use strict';
const value = testForeignObject(document);
const value =
typeof Array.from === 'function' && typeof window.fetch === 'function'
? testForeignObject(document)
: Promise.resolve(false);
Object.defineProperty(FEATURES, 'SUPPORT_FOREIGNOBJECT_DRAWING', {value});
return value;
},