Object: HTMLDocument
HTMLDocument event handlers
HTMLDocument properties
|
Property name |
Type |
Description |
Status |
Support level |
Availability |
|---|---|---|---|---|---|
|
Returns an index of the <a> elements contained within the document. Index positions begin at 0 and continue to HTMLCollection.length-1. |
read only |
DOM 2 HTML |
3.8 or later |
||
|
Returns an index of the <applet> elements and <object> elements containing applets contained within the document. Index positions begin at 0 and continue to HTMLCollection.length -1. |
read only |
DOM 2 HTML |
3.8 or later |
||
|
Returns the element that contains the content of the document. In documents with <body> elements, returns the <body> element. In frameset documents, returns the outermost <frameset> element. This property is writable. However, be aware that specifying a new value for this property effectively removes all the renderable content of the document. |
writable |
DOM 2 HTML |
3.8 or later |
||
|
DOMString |
Returns whether or not this document is rendered in strict mode. A value of “CSS1Compat” indicates strict mode is enforced. A value of “BackCompat” indicates that strict mode is not enforced. |
read only |
HTML 5 |
3.8 or later |
|
|
DOMString |
When the BlackBerry® Browser reads this property, it returns a semicolon-separated list of the name-value pairs of all visible and unexpired cookies associated with the document or frame. When you set a value for this property, each new value must be a single name-value pair followed by zero or more cookie attributes. If the specified name is already associated with a cookie, the new value and attributes replace the old value and attributes. If the value you specify does not adhere to correct cookie syntax, this property throws a SYNTAX_ERR. |
writable |
DOM 2 HTML |
3.8 or later |
|
|
DOMString |
Specifies the domain name from which the document was served. |
writable |
DOM 2 HTML |
3.8 or later |
|
|
Returns an index of the <form> elements contained within the document. Index positions begin at 0 and continue to HTMLCollection.length -1. |
read only |
DOM 2 HTML |
3.8 or later |
||
|
Returns an index of the <img> elements contained within the document. Index positions begin at 0 and continue to HTMLCollection.length -1. |
read only |
DOM 2 HTML |
3.8 or later |
||
|
Returns an index of the <link> elements contained in the document. Index positions begin at 0 and continue to HTMLCollection.length -1. |
read only |
DOM 2 HTML |
3.8 or later |
||
|
Specifies information about the URI of the document. |
writable |
HTML 5 |
3.8 or later |
||
|
DOMString |
Returns the URL of the document that linked to the active document. |
read only |
DOM 2 HTML |
3.8 or later |
|
|
DOMString |
Specifies the text contained within the <title> element of the active document. |
writable |
DOM 2 HTML |
3.8 or later |
|
|
DOMString |
Returns the complete URL of the active document. |
read only |
DOM 2 HTML |
3.8 or later |
HTMLDocument methods
|
Method name |
Description |
Support level |
Availability |
|---|---|---|---|
|
Closes the document opened by HTMLDocument.open() and forces rendering. |
DOM 2 HTML |
3.8 or later |
|
|
Returns an array of all the elements in the document with the specified name. |
DOM 2 HTML |
4.6 or later |
|
|
Opens a document stream for writing. |
DOM 2 HTML |
3.8 or later |
|
|
Writes a string of text to a document stream opened by HTMLDocument.open(). |
DOM 2 HTML |
3.8 or later |
|
|
Writes a string of text, followed by a new line character to a document stream opened by HTMLDocument.open(). |
DOM 2 HTML |
3.8 or later |