Accessible through the global document object. Most of the createX methods, except for createElement, are not implemented in Mozilla for XUL documents.
JavaScript Properties and Methods:
The character set of the document.
Creates a new attribute object and returns it. This will be a DOM Attr object. If you want to add a new attribute to an element, you should use setAttribute on the element.
Creates a new attribute object with a different namespace than the default and returns it. The namespace argument should be the URI of the namespace.
Creates a new CDATA node for a document and returns it.
Creates a new comment node within a document and returns it.
Creates a new document fragment and returns it.
Creates a new element. The one argument is the name of the tag for the element that you want to create. This function would be used to add new rows new menus and trees. The function returns the created element which you can then add anywhere into the document.
It creates a new element similar to createElement but allows you to specify a namespace. The namespace argument should be the URI of the namespace.
Creates and returns a new entity reference node.
Creates a new processing instruction node and returns it. Processing instructions are the tags that are surrounded by question marks.
Creates a new text node and returns it. This can be used if you want to modify the text inside a tag, for example inside the html element.
The view for the document, which will typically refer to the window object for the document.
Returns the doctype of the document. In HTML this is specified with the doctype declaration often found at the top of the document. This property is read only.
Returns an Element object for the document body.
This method will return an array of the direct anonymous children of the element passed in as the argument elem. The element in the first position of the array is the first child as defined in the content tag of the XBL definition.
Returns the element within the document that has the given id. This is a common way to retreive references to elements in a document.
Returns an array of all the elements in the document that have the attribute given by the first argument attrib set to the value given by the second argument val. The following example will return all of the checked items in the document.
var elems=document.getElementsByAttribute("checked","true");
The height of the document.
Returns the DOMImplmentation object for the document which can be used to create new documents and determine what DOM features are supported.
Uses to copy a node from another document into this document. If the deep argument is true, child nodes are also imported.
Gets and sets the value of the persist attribute.
Holds a reference to the element that has the current popup window open. For example, if a box has a context menu associated with it, the value of document.popupNode with hold a reference to the box element. The value of this property is not cleared when the popup is closed. Thus, popupNode will still hold a reference to the box even after the popup is closed.
Holds a reference to the element that has the current tooltip open. For example, document.tooltipNode will hold a reference to the toolbar button when its tooltip is displayed. If no tooltip is displayed, this value will be null.
The width of the document.