@samitouri / QOS-React / commits / 857ed18b06

Fix for createHTMLDocument API specific to IE11 (#10921)

* Fix for createHTMLDocument API specific to IE11 The createHTMLDocument API title parameter is not optional in IE while other browsers don't care IE11 will throw if an argument is not passed. This only impacts react.dom.development not react.dom.production. * Tweak

John Leidegren committed Sep 28, 2017 at 19:34 UTC 857ed18b06e2deab66f92eea87860baf56931769
1 file changed +2 -1
src/renderers/dom/fiber/ReactDOMFiberComponent.js
+2 -1
@@ -132,7 +132,8 @@ if (__DEV__) {
132 // can be used for comparison.
133 var normalizeHTML = function(parent: Element, html: string) {
134 if (!testDocument) {
135 - testDocument = document.implementation.createHTMLDocument();
135 + // The title argument is required in IE11 so we pass an empty string.
136 + testDocument = document.implementation.createHTMLDocument('');
137 }
138 var testElement = parent.namespaceURI === HTML_NAMESPACE
139 ? testDocument.createElement(parent.tagName)