@samitouri / QOS-React-2 / commits / f4753030a2

IE support

Thomas Aylott committed Nov 25, 2013 at 16:01 UTC f4753030a2890db116478c2983655b873d709d75
1 file changed +7 -3
src/test/getTestDocument.js
+7 -3
@@ -18,10 +18,14 @@
18
19 function getTestDocument() {
20 var iframe = document.createElement('iframe');
21 - iframe.style.cssText = 'position:absolute; visibility:hidden; bottom:100%; right:100%';
22 - iframe.src = 'data:text/html,<!doctype html><meta charset=utf-8><title>test doc</title>';
21 + iframe.style.display = 'none';
22 document.body.appendChild(iframe);
24 - var testDocument = iframe.contentDocument;
23 +
24 + var testDocument = iframe.contentDocument || iframe.contentWindow.document;
25 + testDocument.open();
26 + testDocument.write('<!doctype html><meta charset=utf-8><title>test doc</title>');
27 + testDocument.close();
28 +
29 iframe.parentNode.removeChild(iframe);
30 return testDocument;
31 }