SUMMARY
The DOM Level 2 specifications define several modules that augment the functionality of DOM Level 1. DOM Level 2 Core introduces several new methods related to XML namespaces on various DOM types. These changes are relevant only when used in XML or XHTML documents; they have no use in HTML documents. Methods not related to XML namespaces include the ability to programmatically create new instances of Document
and to enable the creation of DocumentType
objects.
The DOM Level 2 Style module specifies how to interact with stylistic information about elements as follows:
- Every element has a
style
object associated with it that can be used to determine and change inline styles. - To determine the computed style of an element, including all CSS rules that apply to it, you can use a method called
getComputedStyle()
. - It's also possible to access style sheets via the
document.styleSheets
collection.
The DOM Level 2 Traversals and Range module specifies different ways to interact with...