Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 15. Utilizing the Document Objec... > Data Types Returned by DOM Methods

Data Types Returned by DOM Methods

Whenever a DOM method is used, a type of data or object will be returned. Table 15.1 presents the data and object types used in DOM.

Table 15.1. Data and Object Types Used in DOM
Datatype Description of Nodes That Take This Datatype
unsigned short All nodeTypes are unsigned short integers.
unsigned long The length of a nodeList or an NamedNodeMap (for example, the number of items it contains) is an unsigned long integer.
Node This is an object containing all the details of the node, such as its type, name, value, parent node, child nodes, and so on.
NodeList An object that is an indexed list of node objects.
NamedNodeMap An object that is a non-indexed list of node objects. (In practice, this applies to Attr, entity, or notation nodes.)
DOMString A string that consists of Unicode characters.
Boolean True or false.
Void A few methods return no value.



  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint