The DOM level 1 worked only with the Core and the HTML modules. While the extension level1 describes direct relationship between DOM and HTML tags, the extension level2 expands to all other document types, therefore it can be said that it is a language agnostic. The extension level 3 deals mostly with namespaces, inheritence and node names extensions and definitions.
NAME |
DOM LEVEL |
DESCRIPTION |
---|
DOM Core module |
level 1 |
The core module. Defines interfaces for manipulating document objects. |
HTML module |
level 1 |
Explains changes in objects and methods specific only to HTML / XHTML documents. |
CSS module |
level 2 |
Defines interfaces for document styling. |
Events module |
level 2 |
Defines ways for managing events subscriptions. |
Range module |
level 2 |
Describes the range of content and methods of accesing a document's tree. |
Traversal module |
level 2 |
Defines interfaces for traversal of a document's content. |
Views module |
level 2 |
Describes static or dynamic rendering of the document. |
Load and Save module |
level 3 |
Loads content of a XML doxument to a DOM document or saves the DOM document to a XML one. |
XPath module |
level 3 |
Describes the work withXPath expressions. |
To check whether a DOM module exists or not within a browser, the DOMImplementation interface may be used in combination with the hasFeature() method.
var supported = document.implementation.hasFeature('Events', '2.0');
NAME (METHOD) |
DESCRIPTION |
---|
createAttributeNS() |
Creates an attribute in the given namespace URI document. |
createElementNS() |
Creates an element in the given namespace URI document. |
getAttributeNodeNS() |
Returns the attribute node from the given namespace URI. |
getAttributeNS() |
Returns the attribute value from the given namespace URI. |
getElementsByTagNameNS() |
Returns a NodeList of all children elements for the given namespace URI. |
hasAttributeNS() |
Checks if the given attribute exist in the given namespace URI. |
isDefaultNamespace() |
Checks if the given namespace URI is default or not. |
lookupNamespacesURI() |
Returns the namespace URI with the given prefix of a node. |
lookupPrefix() |
Returns the prefix with the given namespace of a node. |
removeAttributeNS() |
Removes the attribute'a value from the given namespace URI. |
setAttributeNS() |
Sets an attribute value for the given namespace URI. |
NAME |
DEFINITON |
DESCRIPTION |
---|
cssText |
property |
Sets or returns the styles of a content as a string. |
getComputedStyle() |
method |
Verifies what is the final computed style of an element. |
getPropertyPriority() |
method |
Checks if the property is labeled as !important; or not. |
getPropertyValue() |
method |
Returns the value of a property. |
Item() |
method |
Reads the CSS property at the given position. |
length |
property |
Returns the number (length) of properties used on an element. |
parentRule |
property |
Sets or returns the CSS rule object with the information about the container. |
removeProperty() |
method |
Remove the property specified in by the name. |
setProperty() |
method |
Sets a new property (or modifes and old one) with its value and priority. |
|
---|
cssRules[] |
property |
An array collection containing the style sheets. |
deleteRule() |
method |
Deletes a rule from the style sheet. |
disabled |
property |
Checks if the style sheet is disabled. |
document.styleSheets[] |
property |
Lists all style sheets available. |
Element.sheet() / Element.styleSheet() |
method |
Reference a style sheet fetched from <link> or <style> element. |
href |
property |
Verifies the URL of the style sheet if external (<link>) |
insertRule() |
method |
Inserts a rule from the style sheet at the given index. |
media |
property |
Lists the media types supported by the style sheet. |
ownerNode |
property |
Indicates which element owns the styles that it refers to. |
ownerRule |
property |
Returns the styles if they were imported with the @import. |
parentStyleSheet |
property |
Indicates which style sheet was included with the @import rule. |
title |
property |
Indicates the title attribute of the ownerNode. |
type |
property |
Indicates the type of the style sheets. |
|
---|
cssText |
property |
Returns the CSS rule as a text. |
deleteRule() |
method |
Deletes an existing rule. |
insertRule() |
method |
Inserts a new style rule at the given position. |
parentRule |
property |
Returns the parent containing rule if existing. |
selectorText |
property |
Returns the selector text for the rule. |
style |
property |
Returns the CSS style object that sets ot gets a specific value for the rule. |
type |
property |
Indicates the type of the rule. |
NAME |
DEFINITON |
DESCRIPTION |
---|
clientHeight |
property |
Returns an element content area height together with the top and bottom padding. |
clientWidth |
property |
Returns an element content area width together with the left and right padding. |
offsetHeight |
property |
Returns an element layout's height together with the horizontal bar, top and bottom border. |
offsetLeft |
property |
Returns an element position from the left edge to inside the left border. |
offsetTop |
property |
Returns an element position from the top edge to inside thetop border. |
offsetWidth |
property |
Returns an element layout's width together with the scrollbar, left and right border. |
scrollHeight |
property |
Returns the height of the content without scrollbars. |
scrollLeft |
property |
Returns the position of the content from the left edge. |
scrollTop |
property |
Returns the position of the content from the top edge. |
scrollWidth |
property |
Returns the width of the content without scrollbars. |
NAME |
DEFINITON |
DESCRIPTION |
---|
cloneContents() |
method |
Returns range data to be used elsewhere. |
commonAncestorContainer |
property |
Finds the highest parent container that has starContainer and endContainer as descendants. |
CompareBoundaryPoints() |
method |
Compares current range with the given one. |
createRange() |
method |
Creates a new range. |
deleteContents() |
method |
Deletes range data from original range. |
detach() |
method |
Releases (cleans up) the created range. |
endContainer |
property |
Selects the node within which the range ends. |
endOffset |
property |
Selects the offset within the ending node of a range. |
extractContents() |
method |
Returns range data to be used elsewhere and deletes them from original range. |
insertNode() |
method |
Inserts a node to a range. |
selectNode() |
method |
Select a node and its children within a range. |
selectNodeContents() |
method |
Select a node's children. |
setEnd() |
method |
Sets the end position of a range given by the end node and end offset. |
setEndAfter() |
method |
Sets the end position of a range after the given node. |
setEndBefore() |
method |
Sets the end position of a range before the given node. |
setStart() |
method |
Sets the start position of a range given by the start node and start offset. |
setStartAfter() |
method |
Sets the start position of a range after the given node. |
setStartBefore() |
method |
Sets the starts position of a range before the given node. |
startContainer |
property |
Selects the node within which the range starts. |
startOffset |
property |
Provides the offset where to start the conatiner. |
Comments
No comments have been made yet.
Please login to leave a comment. Login now