HTMLIFrameElement.addNextPaintListener()HTMLIFrameElement.clearMatch()HTMLIFrameElement.download()HTMLIFrameElement.executeScript()HTMLIFrameElement.findAll()HTMLIFrameElement.findNext()HTMLIFrameElement.getActive()HTMLIFrameElement.getCanGoBack()HTMLIFrameElement.getCanGoForward()HTMLIFrameElement.getContentDimensions()HTMLIFrameElement.getMainfest()HTMLIFrameElement.getMuted()HTMLIFrameElement.getScreenshot()HTMLIFrameElement.getStructuredData()HTMLIFrameElement.goBack()HTMLIFrameElement.goForward()HTMLIFrameElement.getVisible()HTMLIFrameElement.getVolume()HTMLIFrameElement.mute()HTMLIFrameElement.purgeHistory()HTMLIFrameElement.reload()HTMLIFrameElement.removeNextPaintListener()HTMLIFrameElement.sendMouseEvent()HTMLIFrameElement.sendTouchEvent()HTMLIFrameElement.setActive()HTMLIFrameElement.setInputMethodActive()HTMLIFrameElement.setNFCFocus()HTMLIFrameElement.setVisible()HTMLIFrameElement.setVolume()HTMLIFrameElement.stop()HTMLIFrameElement.unmute()HTMLIFrameElement.zoom()mozbrowseractivitydonemozbrowserasyncscrollmozbrowseraudioplaybackchangemozbrowsercaretstatechangedmozbrowserclosemozbrowsercontextmenumozbrowserdocumentfirstpaintmozbrowsererrormozbrowserfindchangemozbrowserfirstpaintmozbrowsericonchangemozbrowserloadendmozbrowserloadstartmozbrowserlocationchangemozbrowsermanifestchangemozbrowsermetachangemozbrowseropensearchmozbrowseropentabmozbrowseropenwindowmozbrowserresizemozbrowserscrollmozbrowserscrollareachangedmozbrowserscrollviewchangemozbrowsersecuritychangemozbrowserselectionstatechangedmozbrowsershowmodalpromptmozbrowsertitlechangemozbrowserusernameandpasswordrequiredmozbrowservisibilitychangeWarning: Removed in Firefox 65.
The getContentDimensions() method of the HTMLIFrameElement interface retrieves the X and Y dimensions of the content window.
Note: The values returned are equivalent to document.body.scrollWidth and document.body.scrollHeight.
var instanceOfDOMRequest = instanceOfHTMLIframeElement.getContentDimensions();
A DOMRequest for handling the dimensions request. Its request.onsuccess handler handles the success case, and its request.onerror handler handles the failure case.
The X and Y dimensions are available in the request.result.x and request.result.y properties, respectively.
None.
var browser = document.querySelector('iframe'); var request = browser.getContentDimensions(); request.onsuccess = function() { console.log("page size:", request.result.width + "x" + request.result.height); } request.onerror = function() { console.log("Download error"); }
Not part of any specification.
Supported since Firefox 47, in chrome code only. Removed completely in Firefox 65.
Unlikely ever to be supported in other browsers.