Last active
January 13, 2020 22:49
-
-
Save cvle/67b69517b7d3e83f5de9ccace270415c to your computer and use it in GitHub Desktop.
Make Fluent work in IE11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Wait for this to land: https://github.com/zloirock/core-js/pull/732 | |
// Then use this custom markup parser in <LocalizationProvider> as <template> doesn't work in IE11. | |
const parser = new DOMParser(); | |
function parseMarkup(str: string) { | |
const doc = parser.parseFromString(`<body>${str}</body>`, "text/html"); | |
return Array.from(doc.body.childNodes); | |
} | |
// Also don't forget to transpile fluent using babel to support IE11 :-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment