Skip to content
premasagar edited this page Sep 13, 2010 · 14 revisions

Except where otherwise stated, all methods return the AOMI object itself, to allow method chaining.

body()

Returns the <body> element of the iframe’s document, wrapped in a jQuery collection.

If the body element cannot be accessed (e.g. because the iframe is not in the DOM, or the iframe is displaying a document from a different domain), then an an empty jQuery collection, with zero length, is returned.

body(contents, [emptyFirst])

  • contents will be appended to the iframe’s <body> element. May be an HTML string, DOM node, jQuery collection, or selector.
  • emptyFirst is an optional boolean (default false). If true, the body element will first be emptied of all child nodes.

head()

Returns the <head> element of the iframe’s document, wrapped in a jQuery collection.

If the head element cannot be accessed (e.g. because the iframe is not in the DOM, or the iframe is displaying a document from a different domain), then an an empty jQuery collection, with zero length, is returned.

head(contents, [emptyFirst])

  • contents will be appended to the iframe’s <head> element. May be an HTML string, DOM node, jQuery collection, or selector.
  • emptyFirst is an optional boolean (default false). If true, the head element will first be emptied of all child nodes.

window()

Returns the iframe’s window object, wrapped in a jQuery collection.

If the window object cannot be accessed (e.g. because the iframe is not in the DOM, or the iframe is displaying a document from a different domain), then an an empty jQuery collection, with zero length, is returned.

document()

Returns the iframe’s document object, wrapped in a jQuery collection.

If the document object cannot be accessed (e.g. because the iframe is not in the DOM, or the iframe is displaying a document from a different domain), then an an empty jQuery collection, with zero length, is returned.

$()

A shortcut for document(). This is analagous to the jQuery method $.(), which returns the global document object.

$(selector)

Returns a jQuery collection, using the selector within the context of the iframe’s document body.

doctype()

location()

contents()

title()

style()

resize()

Clone this wiki locally