-
Notifications
You must be signed in to change notification settings - Fork 4
API: Basic methods
Except where otherwise stated, all methods return the AOMI object itself, to allow method chaining.
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.
-
contentswill be appended to the iframe’s<body>element. May be an HTML string, DOM node, jQuery collection, or selector. -
emptyFirstis an optional boolean (defaultfalse). Iftrue, the body element will first be emptied of all child nodes.
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.
-
contentswill be appended to the iframe’s<head>element. May be an HTML string, DOM node, jQuery collection, or selector. -
emptyFirstis an optional boolean (defaultfalse). Iftrue, the head element will first be emptied of all child nodes.
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.
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.
Returns a jQuery collection, using the selector within the context of the iframe’s document body.