You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
fix(resource_url_resolver): IE/Safari compatible HTML parsing
On Internet Explorer (e.g. IE10 on Win7), the following weird bug occurs
with template elements. FYI, IE does not support template element, but
this bug appears to only hit template elements and but not other unknown
elements.
var doc = new DOMParser().parseFromString("<!doctype html><html><body><template>CONTENTS</template></body></html>", "text/html");
// Prints "<template>CONTENTS</template>" as expected.
console.log(doc.body.innerHTML);
// This should be a no-op.
doc.body.querySelectorAll("div");
// Prints "<template></template>" - completely losing "CONTENTS".
console.log(doc.body.innerHTML);
This commit uses an alternate parsing method compatible with supported
browsers, and also fixes a RegExp for IE compatibility.
0 commit comments