iframe.js
No description.

File Location

/goog/dom/iframe.js


Public Protected Private

Global Functions

goog.dom.iframe.createBlank(domHelperopt_styles) !HTMLIFrameElement
Creates a completely blank iframe element. The iframe will not caused mixed-content warnings for IE6 under HTTPS. The iframe will also have no borders or padding, so that the styled width and height will be the actual width and height of the iframe. This function currently only attempts to create a blank iframe. There are no guarantees to the contents of the iframe or whether it is rendered in quirks mode.
Arguments:
domHelper : goog.dom.DomHelper
The dom helper to use.
opt_styles : string=
CSS styles for the iframe.
Returns: !HTMLIFrameElement  A completely blank iframe.
code »
goog.dom.iframe.createWithContent(parentElementopt_headContentsopt_bodyContentsopt_stylesopt_quirks) !HTMLIFrameElement
Creates a same-domain iframe containing preloaded content. This is primarily useful for DOM sandboxing. One use case is to embed a trusted Javascript app with potentially conflicting CSS styles. The second case is to reduce the cost of layout passes by the browser -- for example, you can perform sandbox sizing of characters in an iframe while manipulating a heavy DOM in the main window. The iframe and parent frame can access each others' properties and functions without restriction.
Arguments:
parentElement : !Element
The parent element in which to append the iframe.
opt_headContents : string=
Contents to go into the iframe's head.
opt_bodyContents : string=
Contents to go into the iframe's body.
opt_styles : string=
CSS styles for the iframe itself, before adding to the parent element.
opt_quirks : boolean=
Whether to use quirks mode (false by default).
Returns: !HTMLIFrameElement  An iframe that has the specified contents.
code »
goog.dom.iframe.writeContent(iframecontent)
Writes the contents of a blank iframe that has already been inserted into the document.
Arguments:
iframe : !HTMLIFrameElement
An iframe with no contents, such as one created by goog.dom.iframe.createBlank, but already appended to a parent document.
content : string
Content to write to the iframe, from doctype to the HTML close tag.
code »

Directory dom

File Reference