Experience this while running IE10 with a bookmarklet. When I run books against a page that runs on the page and I try to use the document. Selector, document. Query selector is undefined.
In trying to get around this, when I find out that document.documentMode 5 (Quirks mode), I am creating an IFrame and Criterion mode to copy the contents of the page into that iframe Put in I verify that the document in iFrame is in standard mode (document.documentMode 8- IE8 standard mode) but the document.query selector is still undefined. I believe the query mode should be at least 9 for the query selector. I can not understand why the document is 8 instead of Mad 10, because I'm running on IE 10.
If (goog.userAgent.IE & amp; Document Document Modes & lt; = 5) {// Expose any script of the body s = document.body.innerHTML. Replace (/ & lt; script \ b [^ & lt;] * (?: (?! & Lt; \ / script & gt;) & lt; [^ & lt;] *) * & lt; / script & Gt; / gi, ''); Frame = gog.dom.fr.fr.kreatebank (goog.dom.getDomHelper ()); Frame.scrolling = "No"; Frame.allowTransparency = True; Frame.style.visibility = 'hidden'; Document.body.appendChild (frame); Goog.dom.iframe.writeContent (frame, '& lt ;; doctype html & gt; \ n & lt; html & gt; & gt; head & gt; & lt; meta http-equiv = "X-UA-compatible "Content =" IE = Edge "> / head> gt; body & gt; '+ s +' ;); Doc = goog.dom.getFrameContentDocument (frame); Warning (doc.documentMode); // 8 - IE8 Standard Mode Warning (doc.querySelectorAll); // null}
I just check the documentMode instead (if ( Document.querySelector)) To help me debug this problem, forward
No comments:
Post a Comment