The document of the view. More...
Public Member Functions | |
Comment | createComment (DOMString data) |
Creates a new comment node. More... | |
NodeIterator | createNodeIterator (Node root, optional unsigned long whatToShow=0xFFFFFFFF, optional NodeFilter? filter=null) |
Attr | createAttribute (DOMString localName) |
Attr | createAttributeNS (DOMString? namespace, DOMString qualifiedName) |
Create new attribute node with an associated namespace. More... | |
Node | importNode (Node node, optional boolean deep=false) |
Creates a new copy of the specified Node or DocumentFragment from another document so that it can be inserted into the current Document. More... | |
Node | createElement (CSSString tagName) |
Create a new node. More... | |
DocumentFragment | createDocumentFragment () |
Create new DocumentFragment. More... | |
CustomElementConstructor | registerElement (DOMString type, optional ElementRegistrationOptions options) |
Registers a custom element with the Custom Elements V0 API (deprecated) More... | |
Node | createTextNode ([Default=Undefined] optional DOMString data) |
Creates a new Text node. More... | |
Event | createEvent (CSSString eventType) |
Create a new event. More... | |
NodeList | getElementsByName ([Default=Undefined] optional DOMString elementName) |
Get all nodes with a certain name. More... | |
NodeList | getElementsByTagName (DOMString localName) |
Get all nodes with a certain tag. More... | |
Element | getElementById (DOMString elementId) |
Get a element by its Id. More... | |
boolean | hasFocus () |
Indicating whether the document or any element inside the document has focus. More... | |
NodeList | getElementsByClassName (DOMString classNames) |
Get all nodes with a certain class. More... | |
Public Member Functions inherited from Node | |
Node | removeChild (Node oldChild) |
remove a child node More... | |
Node | appendChild (Node newChild) |
append a node as a child More... | |
Node | replaceChild (Node newChild, Node oldChild) |
replace oldChild with newChild More... | |
Node | insertBefore (Node node, Node? referenceNode) |
insert a node before the reference node, as a child of the current node More... | |
Node | cloneNode (optional boolean deep=false) |
Public Attributes | |
readonly attribute USVString | URL |
Returns the document location as a string. | |
readonly attribute USVString | documentURI |
Returns the document location as a string. | |
readonly attribute USVString | origin |
Returns the document's origin. | |
readonly attribute DOMString | compatMode |
Indicates whether the document is rendered in Quirks mode or Standards mode. | |
readonly attribute DOMString | characterSet |
Returns the character encoding of the current document. The character encoding is the character set used for rendering the document, which may be different from the encoding specified by the page. | |
readonly attribute DOMString | charset |
historical alias of .characterSet | |
readonly attribute DOMString | inputEncoding |
historical alias of .characterSet | |
readonly attribute DOMString | contentType |
Returns the MIME type that the document is being rendered as. | |
readonly attribute DocumentType | doctype |
Returns the Document Type Declaration (DTD) associated with current document. | |
readonly attribute Element | body |
The document body. | |
readonly attribute Element | documentElement |
The root element of the document. | |
readonly attribute Window | defaultView |
The window object associated with the document. | |
readonly attribute Element | head |
The document head element. | |
readonly attribute DOMString | readyState |
Describes the loading state of the document (loading/interactive/complete) | |
readonly attribute Element | activeElement |
The deepest element in the document through which or to which key events are being routed. This is, roughly speaking, the focused element in the document. | |
Public Attributes inherited from Node | |
readonly attribute unsigned short | nodeType |
type of the node | |
readonly attribute Node | parentNode |
parent of the node | |
readonly attribute Element | parentElement |
parent element of the node. If parent is not an Element, returns null. | |
readonly attribute NodeList | childNodes |
list of the children of this node | |
readonly attribute Node | firstChild |
the node's first child in the tree, or null if the node is childless | |
readonly attribute Node | lastChild |
last child of the node, or null if there are no child elements | |
readonly attribute Node | previousSibling |
the node immediately preceding the specified one in its parent's children, or null if the specified node is the first in that list | |
readonly attribute Node | nextSibling |
the node immediately following the specified one in its parent's children, or null if the specified node is the last node in that list | |
readonly attribute Document | ownerDocument |
The Document object associated with this node. This is also the Document object used to create new nodes. When this node is a Document or a DocumentType which is not used with any Document yet, this is null. | |
const unsigned short | ELEMENT_NODE = 1 |
const unsigned short | ATTRIBUTE_NODE = 2 |
const unsigned short | TEXT_NODE = 3 |
const unsigned short | CDATA_SECTION_NODE = 4 |
const unsigned short | ENTITY_REFERENCE_NODE = 5 |
const unsigned short | ENTITY_NODE = 6 |
const unsigned short | PROCESSING_INSTRUCTION_NODE = 7 |
const unsigned short | COMMENT_NODE = 8 |
const unsigned short | DOCUMENT_NODE = 9 |
const unsigned short | DOCUMENT_TYPE_NODE = 10 |
const unsigned short | DOCUMENT_FRAGMENT_NODE = 11 |
const unsigned short | NOTATION_NODE = 12 |
const unsigned short | DOCUMENT_POSITION_DISCONNECTED = 0x01 |
const unsigned short | DOCUMENT_POSITION_PRECEDING = 0x02 |
const unsigned short | DOCUMENT_POSITION_FOLLOWING = 0x04 |
const unsigned short | DOCUMENT_POSITION_CONTAINS = 0x08 |
const unsigned short | DOCUMENT_POSITION_CONTAINED_BY = 0x10 |
const unsigned short | DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20 |
The document of the view.
Attr Document::createAttribute | ( | DOMString | localName | ) |
localName | is a string containing the name of the attribute. |
Attr Document::createAttributeNS | ( | DOMString? | namespace, |
DOMString | qualifiedName | ||
) |
Create new attribute node with an associated namespace.
namespace | the URI of the namespace. |
qualifiedName | the tag name and prefix of the attribute |
Comment Document::createComment | ( | DOMString | data | ) |
Creates a new comment node.
DocumentFragment Document::createDocumentFragment | ( | ) |
Create new DocumentFragment.
Node Document::createElement | ( | CSSString | tagName | ) |
Create a new node.
tagName | the type of the new node |
Event Document::createEvent | ( | CSSString | eventType | ) |
Create a new event.
eventType | specified the type of Event interface to be created |
NodeIterator Document::createNodeIterator | ( | Node | root, |
optional unsigned long | whatToShow = 0xFFFFFFFF , |
||
optional NodeFilter? | filter = null |
||
) |
Node Document::createTextNode | ( | [Default=Undefined] optional DOMString | data | ) |
Creates a new Text node.
data | the text content of the node |
Element Document::getElementById | ( | DOMString | elementId | ) |
Get a element by its Id.
elementId | the element id to search for |
NodeList Document::getElementsByClassName | ( | DOMString | classNames | ) |
Get all nodes with a certain class.
classNames | the classes to search for |
NodeList Document::getElementsByName | ( | [Default=Undefined] optional DOMString | elementName | ) |
Get all nodes with a certain name.
elementName | the name to search for |
NodeList Document::getElementsByTagName | ( | DOMString | localName | ) |
Get all nodes with a certain tag.
localName | the tag to search for |
boolean Document::hasFocus | ( | ) |
Indicating whether the document or any element inside the document has focus.
CustomElementConstructor Document::registerElement | ( | DOMString | type, |
optional ElementRegistrationOptions | options | ||
) |
Registers a custom element with the Custom Elements V0 API (deprecated)
type | the name of the newly registered type |
options | the options for registering. Must include a "prototype" property with the element prototype, and an optional "extends" property for extending existing classes |