javascript Programming Glossary: document.documentelement
How to get height of entire document with JavaScript? http://stackoverflow.com/questions/1145850/how-to-get-height-of-entire-document-with-javascript you tested for correct height width. This involved using document.documentElement properties if available or falling back on document properties.. is basically what jQuery does var body document.body html document.documentElement var height Math.max body.scrollHeight body.offsetHeight html.clientHeight..
Set cursor position on contentEditable <div> http://stackoverflow.com/questions/1181700/set-cursor-position-on-contenteditable-div parentFocus sel.focusNode while parentAnchor parentAnchor document.documentElement if parentAnchor editable isOrContainsAnchor true parentAnchor.. parentAnchor.parentNode while parentFocus parentFocus document.documentElement if parentFocus editable isOrContainsFocus true parentFocus..
How to detect page zoom level in all modern browsers? http://stackoverflow.com/questions/1713771/how-to-detect-page-zoom-level-in-all-modern-browsers . Old WebKit unverified parseInt getComputedStyle document.documentElement null .width document.documentElement.clientWidth from this answer.. getComputedStyle document.documentElement null .width document.documentElement.clientWidth from this answer Opera document.documentElement.offsetWidth.. from this answer Opera document.documentElement.offsetWidth width of a position fixed width 100 div. from here..
Find the exact height and width of the viewport in a cross-browser way (no Prototype/jQuery) http://stackoverflow.com/questions/1766861/find-the-exact-height-and-width-of-the-viewport-in-a-cross-browser-way-no-proto method for height var viewportHeight window.innerHeight document.documentElement.clientHeight document.body.clientHeight I haven't started on.. doctype as the first line in the document else if typeof document.documentElement 'undefined' typeof document.documentElement.clientWidth 'undefined'.. else if typeof document.documentElement 'undefined' typeof document.documentElement.clientWidth 'undefined' document.documentElement.clientWidth..
How to embed Javascript widget that depends on jQuery into an unknown environment http://stackoverflow.com/questions/2170439/how-to-embed-javascript-widget-that-depends-on-jquery-into-an-unknown-environmen j script .remove document.getElementsByTagName head 0 document.documentElement .appendChild script window document 1.3 function jquery_loaded..
Injecting JS functions into the page from a Greasemonkey script on Chrome http://stackoverflow.com/questions/2303147/injecting-js-functions-into-the-page-from-a-greasemonkey-script-on-chrome
Executing <script> elements inserted with .innerHTML http://stackoverflow.com/questions/2592092/executing-script-elements-inserted-with-innerhtml var head document.getElementsByTagName head 0 document.documentElement script document.createElement script script.type text javascript.. elem.innerHTML head document.getElementsByTagName head 0 document.documentElement script document.createElement script script.type text javascript..
Detect changes in the DOM http://stackoverflow.com/questions/3219758/detect-changes-in-the-dom Check for mutation events support var support var el document.documentElement var remain 3 callback for the tests function decide if support.DOMNodeInserted..
'onload' handler for 'script' tag in internet explorer http://stackoverflow.com/questions/4845762/onload-handler-for-script-tag-in-internet-explorer from jQuery var head document.getElementsByTagName head 0 document.documentElement var script document.createElement script if s.scriptCharset..
Define global variable in a JavaScript function http://stackoverflow.com/questions/5786851/define-global-variable-in-a-javascript-function document.compatMode document.compatMode BackCompat document.documentElement document.body function hidetrail var x document.getElementById..
How can I detect a Scrollbar presence ( using Javascript ) in HTML iFrame? http://stackoverflow.com/questions/681087/how-can-i-detect-a-scrollbar-presence-using-javascript-in-html-iframe I have already tried var vHeight 0 if document.all if document.documentElement vHeight document.documentElement.clientHeight else vHeight.. 0 if document.all if document.documentElement vHeight document.documentElement.clientHeight else vHeight document.body.clientHeight else vHeight..
Get entire document HTML as string http://stackoverflow.com/questions/817218/get-entire-document-html-as-string JS to get the entire HTML within the html tags as a string document.documentElement. javascript html document tostring share improve this question..
Cross-browser method for detecting the scrollTop of the browser window http://stackoverflow.com/questions/871399/cross-browser-method-for-detecting-the-scrolltop-of-the-browser-window pageYOffset else var B document.body IE 'quirks' var D document.documentElement IE with doctype D D.clientHeight D B return D.scrollTop alert..
Building a Chrome Extension - Inject code in a page using a Content script http://stackoverflow.com/questions/9515704/building-a-chrome-extension-inject-code-in-a-page-using-a-content-script function this.parentNode.removeChild this document.head document.documentElement .appendChild s When your extension's manifest specifies manifest_version.. 'script' script.textContent actualCode document.head document.documentElement .appendChild script script.parentNode.removeChild script Method.. 'script' script.textContent actualCode document.head document.documentElement .appendChild script script.parentNode.removeChild script This..
Chrome extension - retrieving Gmail's original message http://stackoverflow.com/questions/9602022/chrome-extension-retrieving-gmails-original-message s.src chrome.extension.getURL 'script.js' document.head document.documentElement .appendChild s s.onload function s.parentNode.removeChild s..
|