Results 1 - 20 of 1,243

Examples of web and XML development using the DOM

This chapter provides some longer examples of web and XML development using the DOM. Wherever possible, the examples use common APIs, tricks, and patterns in JavaScript for manipulating the document object.
DOM DOM Reference

NodeFilter

A NodeFilter interface represents an object used to filter the nodes in a NodeIterator or TreeWalker. They don't know anything about the DOM or how to traverse nodes; they just know how to evaluate a single node against the provided filter.
API DOM DOM Reference

CharacterData

The CharacterData abstract interface represents a Node object that contains characters. This is an abstract interface, meaning there aren't any object of type CharacterData: it is implemented by other interfaces, like Text, Comment, or ProcessingInstruction which aren't abstract.
API DOM

Comment

The Comment interface represents textual notations within markup; although it is generally not visually shown, such comments are available to be read in the source view. Comments are represented in HTML and XML as content between '<!--' and '-->'. In XML, the character sequence '--' cannot be used within a comment.
API DOM

Events and the DOM

This chapter describes the DOM Event Model. The Event interface itself is described, as well as the interfaces for event registration on nodes in the DOM, and event listeners, and several longer examples that show how the various event interfaces relate to one another.
DOM Guide

Using the W3C DOM Level 1 Core

The W3C's DOM Level 1 Core is a powerful object model for changing the content tree of documents. It is supported in all major browsers including Mozilla Firefox and Microsoft Internet Explorer. It is a powerful base for scripting on the web.
DOM NeedsUpdate

NodeIterator

The NodeIterator interface represents an iterator over the members of a list of the nodes in a subtree of the DOM. The nodes will be returned in document order.
API DOM

ParentNode

The ParentNode interface contains methods that are particular to Node objects that can have children.
API DOM

Range

The Range interface represents a fragment of a document that can contain nodes and parts of text nodes.
API DOM

Text

The Text interface represents the textual content of Element or Attr.  If an element has no markup within its content, it has a single child implementing Text that contains the element's text.  However, if the element contains markup, it is parsed into information items and Text nodes that form its children.
API DOM

TreeWalker

The TreeWalker object represents the nodes of a document subtree and a position within them.
API DOM

Synchronous and asynchronous requests

XMLHttpRequest supports both synchronous and asynchronous communications. In general, however, asynchronous requests should be preferred to synchronous requests for performance reasons.
DOM XMLHttpRequest

ElementTraversal

The ElementTraversal interface was defining methods allowing to access from one Node to another one in the document tree.
API DOM DOM Reference Obsolete

EventTarget

EventTarget is an interface implemented by objects that can receive events and may have listeners for them.
API DOM DOM Events Interface

Node.baseURIObject

The Node.baseURIObject property returns the nsIURI representing the node's (typically a document or an element) base URL. It's similar to Node.baseURI, except it returns an nsIURI instead of a string.
API DOM DOM 3 DOM Reference Gecko Node Property Reference Référence

DeviceRotationRate.alpha

This property indicates the rate of rotation around the Z axis -- in degrees per second -- in a DeviceRotationRate object.
API DOM DOM Reference Property Reference

DeviceRotationRate.beta

This property indicates the rate of rotation around the X axis -- in degrees per second -- in a DeviceRotationRate object.
API DOM DOM Reference Property Reference

DeviceRotationRate.gamma

This property indicates the rate of rotation around the Y axis -- in degrees per second -- in a DeviceRotationRate object.
API DOM DOM Reference Property Reference

Document.createNSResolver()

Creates an XPathNSResolver which resolves namespaces with respect to the definitions in scope for a specified node.
API DOM DOM Reference Method Reference Référence