JavaScript Tutorials - Herong's Tutorial Examples - Version 2.21, by Dr. Herong Yang
DOM Level 3 - Example
This section provides a tutorial example of DOM Level 3 objects and attributes. There is no Web browser that supports DOM Level 3 yet.
DOM Level 3 - Published in April, 2004: An API of 21 modules: Core, XML, HTML, XPath, Travesal, Range, Validation, Load and Save, Asynchronous Load, Views, Stylesheets, CSS, CSS2, Events, HTML Events, Mutation Events, Mutation Name Events, UI Events, Mouse Events, Text Events, and Keyboard Events.
Here is a tutorial example of using DOM Level 3 objects and properties:
<html> <!-- DOM_Level_3_Example.html Copyright (c) 2013 by Dr. Herong Yang, herongyang.com --> <head> <title>DOM Level 3 Example</title> </head> <body><pre> <script type="text/javascript"> document.writeln("\nNew attributes:"); document.writeln(" document.xmlVersion="+document.xmlVersion); document.writeln(" document.inputEncoding="+document.inputEncoding); document.writeln(" document.xmlEncoding="+document.xmlEncoding); document.writeln(" document.title.textContent=" +document.title.textContent); var feature = document.implementation.getFeature("HTML","3.0"); document.writeln("\nNew methods:"); document.writeln(" document.implementation.getFeature()=" +feature.toString()); </script> </pre></body> </html>
I could not test this JavaScript example page, because there is not Web browser that supports DOM Level 3 yet.
Table of Contents
ECMAScript Language Specification and JavaScript Dialects
Data Types, Variables and Expressions
Creating, Accessing, and Manipulating Arrays
Defining and Calling Functions
Web Browser Supporting JavaScript
Server-Side and Client-Side Web Scripting
Defining Your Own Object Types
Inheritance of Properties and Methods through the Prototype Object Chain
'jrunscript' - JavaScript Shell Command from JDK
Using Functions as "Function" Objects
Introduction to Built-in Object Types
►W3C's Document Object Model (DOM) Specifications
Overview of DOM Specifications
DOM Level Test - document.implementation.hasFeature
Inheritance vs. Flattened Views of the API
A Web Document as A Tree of Different Interfaces
A Web Document as A Tree of Nodes
Dump Document in a New Window - JavaScript Source
Dump Document in a New Window - Firefox 2.0 Result