Photo:1 Photo:2 Photo:3 Photo:4 |
| History | |
| 2>
The history of the Document Object Model is intertwined with the history of the "browser wars" of the late 1990s between Netscape Navigator and Microsoft Internet Explorer, as well as with that of JavaScript and JScript, the first scripting languages to be widely implemented in the layout engines of web browsers.
[edit] Tags:Web Browsers,Layout Engines,Language,Browser Wars,Netscape Navigator,Microsoft Internet Explorer,Javascript,Jscript,Scripting Languages,Microsoft, | |
| Legacy DOM | |
| 3>
JavaScript was released by Netscape Communications in 1996 within Netscape Navigator 2.0. Netscape's competitor, Microsoft, released Internet Explorer 3.0 later the same year with a port of JavaScript called JScript. JavaScript and JScript let web developers create web pages with client-side interactivity. The limited facilities for detecting user-generated events and modifying the HTML document in the first generation of these languages eventually became known as "DOM Level 0" or "Legacy DOM". No independent standard was developed for DOM Level 0, but it was partly described in the specification of HTML4.
Legacy DOM was limited in the kinds of elements that could be accessed. Form, link and image elements could be referenced with a hierarchical name that began with the root document object. A hierarchical name could make use of either the names or the sequential index of the traversed elements. For example, a form input element could be accessed as either "document.formName.inputName" or "document.forms[0].elements[0]".
The Legacy DOM enabled client-side form validation and the popular "rollover" effect.
[edit] Tags:Html,Netscape Communications,Internet Explorer 3.0,Port,Web Developers,Client-side,Events,Html4,Elements,Form,Link,Form Input Element,Rollover,2.0, | |
| Intermediate DOM | |
| 3>
In 1997, Netscape and Microsoft released version 4.0 of Netscape Navigator and Internet Explorer, adding support for Dynamic HTML (DHTML), functionality enabling changes to a loaded HTML document. DHTML required extensions to the rudimentary document object that was available in the Legacy DOM implementations. Although the Legacy DOM implementations were largely compatible since JScript was based on JavaScript, the DHTML DOM extensions were developed in parallel by each browser maker and remained incompatible. These versions of the DOM became known as the "Intermediate DOM."
The Intermediate DOMs enabled the manipulation of Cascading Style Sheet (CSS) properties that influence the display of a document. They also provided access to a new feature called "layers" via the "document.layers" property (Netscape Navigator) and the "document.all" property (Internet Explorer). Because of the fundamental incompatibilities in the Intermediate DOMs, cross-browser development required special handling for each supported browser.
Subsequent versions of Netscape Navigator abandoned support for its Intermediate DOM. Internet Explorer continues to support its Intermediate DOM for backwards compatibility.
[edit] Tags:Dynamic Html,Cascading Style Sheet,Cross-browser,Backwards Compatibility,Css,Its, | |
| Standardization | |
| 3>
The World Wide Web Consortium (W3C), founded in 1994 to promote open standards for the World Wide Web, brought Netscape Communications and Microsoft together with other companies to develop a standard for browser scripting languages, called "ECMAScript". The first version of the standard was published in 1997. Subsequent releases of JavaScript and JScript would implement the ECMAScript standard for greater cross-browser compatibility.
After the release of ECMAScript, W3C began work on a standardized DOM. The initial DOM standard, known as "DOM Level 1," was recommended by W3C in late 1998. About the same time, Internet Explorer 5.0 shipped with limited support for DOM Level 1. DOM Level 1 provided a complete model for an entire HTML or XML document, including means to change any portion of the document. Non-conformant browsers such as Internet Explorer 4.x and Netscape 4.x were still widely used as late as 2000.
DOM Level 2 was published in late 2000. It introduced the "getElementById" function as well as an event model and support for XML namespaces and CSS. DOM Level 3, the current release of the DOM specification, published in April 2004, added support for XPath and keyboard event handling, as well as an interface for serializing documents as XML.
By 2005, large parts of W3C DOM were well-supported by common ECMAScript-enabled browsers, including Microsoft Internet Explorer version 6 (2001), Opera, Safari and Gecko-based browsers (like Mozilla, Firefox, SeaMonkey and Camino).
[edit] Tags:W3c,Xml,World Wide Web Consortium,Open Standards,World Wide Web,Ecmascript,Getelementbyid,Event Model,Xml Namespaces,Xpath,Event Handling,Serializing,Microsoft Internet Explorer Version 6 (2001),Opera,Safari,Gecko,Mozilla,Firefox,Seamonkey,Camino,Xml Namespace, | |
| Web browsers | |
| 3>
This section may require copy editing for grammar, style, cohesion, tone, or spelling. You can assist by editing it. (September 2011)
Web browsers usually use an internal model similar to the DOM in order to render a document (such as an HTML page). The DOM APIs are also used to inspect or modify a Web page from JavaScript code. In other words, the Document Object Model is the way JavaScript sees the browser state and the HTML page it contains.
When an HTML page is rendered in a browser, the browser parses the markup (e.g. HTML), downloaded from the web-server into an in-memory DOM. The DOM is used to construct additional internal structures used to display the page in the browser window.
The nodes of every document are organized in a tree structure, called the DOM tree. The topmost node in the DOM tree is the Document object. Each node has 0 or more children.
An example of a DOM tree is shown below:
|-> Document
|-> Element (<html>)
|-> Element (<body>)
|-> Element (<div>)
|-> text node
|-> Anchor
|-> text node
|-> Form
|-> Text-box
|-> Text Area
|-> Radio Button
|-> Check Box
|-> Select
|-> Button
[edit] Tags: | |
| Implementations | |
| 2>
Because DOM supports navigation in any direction (e.g., parent and previous sibling) and allows for arbitrary modifications, an implementation must at least buffer the document that has been read so far (or some parsed form of it).[citation needed]
[edit] Tags: | |
| Layout engines | |
| 3>
Web browsers rely on layout engines to parse HTML into a DOM. Some layout engines such as Trident/MSHTML and Presto are associated primarily or exclusively with a particular browser such as Internet Explorer and Opera respectively. Others, such as WebKit and Gecko, are shared by a number of browsers, such as Google Chrome, Firefox and Safari. The different layout engines implement the DOM standards to varying degrees of compliance.
See also: Comparison of layout engines (Document Object Model)
[edit] Tags:Trident/mshtml,Presto,Webkit,Google Chrome, | |
| Libraries | |
| 3>
DOM implementations:
libxml2
MSXML
Xerces is a C++ DOM implementation with Java and Perl bindings
APIs that expose DOM implementations:
JAXP (Java API for XML Processing) is an API for accessing DOM providers
[edit] Tags:Libxml2,Msxml,Xerces,Jaxp,Sxml, | |
| See also | |
| 2>
Ajax—a methodology employing DOM in combination with techniques for retrieving data without reloading a page.
Application Object Model
DOM scripting
JDOM—a Java-based document object model for XML that integrates with DOM and SAX and uses parsers to build the document.
jQuery
JSON
Prototype.js
RapidXml—is an attempt to create the fastest XML parser possible using modern C++.
SAX—serial access parser API for XML, an alternative to DOM.
SXML—a model for representing XML and HTML in the form of S-expressions.
TinyXml—efficient platform-independent XML library for C++.
[edit] Tags:Ajax,Application Object Model,Dom Scripting,Jdom,Sax,Jquery,Json,Prototype.js,Rapidxml,Tinyxml, | |
| References | |
| 2>
^ "Document Object Model (DOM)". http://www.w3.org/: W3C. http://www.w3.org/DOM/#what. Retrieved 2012-01-12. "The Document Object Model is a platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure and style of documents."
Flanagan, David (2006). JavaScript: The Definitive Guide. O'Reilly & Associates. pp. 312–313. ISBN 0596101996.
Koch, Peter-Paul (May 14, 2001). "The Document Object Model: an Introduction". Digital Web Magazine. http://www.digital-web.com/articles/the_document_object_model/. Retrieved January 10, 2009.
Le Hégaret, Philippe (2002). "The W3C Document Object Model (DOM)". World Wide Web Consortium. http://www.w3.org/2002/07/26-dom-article.html. Retrieved January 10, 2009.
Guisset, Fabian. "What does each DOM Level bring?". Mozilla Developer Center. Mozilla Project. https://developer.mozilla.org/en/docs/DOM_Levels. Retrieved January 10, 2009.
[edit] Tags: | |
| External links | |
| 2>
Wikimedia Commons has media related to:
Document object models
Document Object Model by the World Wide Web Consortium
Technology Reports
What does your user agent claim to support?
W3C DOM scripts and compatibility tables (Quirksmode)
Gecko DOM Reference (Mozilla Developer Center)
IB DOM Utilities: Mapping JavaScript Objects to DOM Elements
XJR with DOM, SAX2, and XPath interfaces
Firefox plugin that lets you visualize a Web's page DOM in 3D
v
d
e
World Wide Web Consortium
Products and
standards
Recommendations
Canonical XML
CDF
CSS
DOM
Geolocation API
HTML
ITS
MathML
OWL
P3P
PLS
RDF
RDF Schema
SISR
SKOS
SMIL
SOAP
SRGS
SSML
SVG
SPARQL
Timed Text
VoiceXML
WSDL
XForms
XHTML
XHTML+RDFa
XInclude
XLink
XML
XML Base
XML Encryption
XML Events
XML Information Set
XML namespace
XML Schema
XML Signature
XPath 1.0, 2.0
XPointer
XProc
XQuery
XSL
XSL-FO
XSLT (elements)
Notes
XAdES
XHTML+SMIL
XUP
Working Drafts
CCXML
CURIE
HTML5
InkML
RIF
SCXML
SMIL Timesheets
sXBL
WICD
XFDL
XFrames
XBL
XHTML+MathML+SVG
XMLHttpRequest
Guidelines
Web Content Accessibility Guidelines
Initiative
Multimodal Interaction Activity
Markup Validation Service
Web Accessibility Initiative
Deprecated
C-HTML
HDML
JSSS
PGML
VML
Organizations
World Wide Web Foundation
SVG Working Group
WebOnt
W3C Device Description Working Group
WHATWG
Software
Agora
Argo
Arena
Amaya
CERN httpd
Libwww
Line Mode Browser
Conference-related
IW3C2
World Wide Web Conference
WWW1
Retrieved from "http://en.wikipedia.org/w/index.php?title=Document_Object_Model&oldid=473762364"
Categories: Application programming interfacesObject modelsWorld Wide Web Consortium standardsXML-based standardsHTMLHidden categories: Articles lacking in-text citations from August 2010All articles lacking in-text citationsWikipedia articles needing copy edit from September 2011All articles needing copy editAll articles with unsourced statementsArticles with unsourced statements from January 2012
Personal tools
Log in / create account
Namespaces
Article
Talk
Variants
Views
Read
Edit
View history
Actions
Search
Navigation
Main page
Contents
Featured content
Current events
Random article
Donate to Wikipedia
Interaction
Help
About Wikipedia
Community portal
Recent changes
Contact Wikipedia
Toolbox
What links here
Related changes
Upload file
Special pages
Permanent link
Cite this page
Print/export
Create a bookDownload as PDFPrintable version
Languages
Afrikaans
العربية
Català
Česky
Deutsch
Eesti
Español
Euskara
فارسی
Français
한국어
Bahasa Indonesia
Italiano
עברית
Magyar
Македонски
മലയാളം
Bahasa Melayu
Nederlands
日本語
Norsk (bokmål)
Norsk (nynorsk)
Polski
Português
Русский
Slovenčina
Suomi
Svenska
தமிழ்
ไทย
Türkçe
Türkmençe
Українська
Tiếng Việt
中文
This page was last modified on 28 January 2012 at 22:58.
Text is available under the Creative Commons Attribution-ShareAlike License;
additional terms may apply.
See Terms of use for details.
Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.Contact us
Privacy policy
About Wikipedia
Disclaimers
Mobile view
if ( window.isMSIE55 ) fixalpha();
if ( window.mediaWiki ) {
mw.loader.load(["mediawiki.user", "mediawiki.util", "mediawiki.page.ready", "mediawiki.legacy.wikibits", "mediawiki.legacy.ajax", "mediawiki.legacy.mwsuggest", "ext.gadget.wmfFR2011Style", "ext.vector.collapsibleNav", "ext.vector.collapsibleTabs", "ext.vector.editWarning", "ext.vector.simpleSearch", "ext.UserBuckets", "ext.articleFeedback.startup", "ext.articleFeedbackv5.startup", "ext.markAsHelpful"]);
}
if ( window.mediaWiki ) {
mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":1,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"highlightbroken":1,"imagesize":2,"justify":0,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":5,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":false,"showjumplinks":1,"shownumberswatching":1,"showtoc":1,"showtoolbar":1,"skin":"vector","stubthreshold":0,"thumbsize":4,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":1,"watchdefault":0,"watchdeletion":0,"watchlistdays":3,"watchlisthideanons":0,
"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"flaggedrevssimpleui":1,"flaggedrevsstable":0,"flaggedrevseditdiffs":true,"flaggedrevsviewdiffs":false,"vector-simplesearch":1,"useeditwarning":1,"vector-collapsiblenav":1,"usebetatoolbar":1,"usebetatoolbar-cgd":1,"wikilove-enabled":1,"variant":"en","language":"en","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"searchNs100":false,"searchNs101":false,"searchNs108":false,"searchNs109":false,"gadget-wmfFR2011Style":1});;mw.user.tokens.set({"editToken":"+\\","watchToken":false});;mw.loader.state({"user.options":"ready","user.tokens":"ready"});
/* cache key: enwiki:resourceloader:filter:minify-js:4:b41a86ec4e0fe8329bc3ce917e792339 */
}
Tags:Html5,Xhtml,C-html,Whatwg,Objects,Application Programming Interface,Recommendations,Canonical Xml,Cdf,Geolocation Api,Mathml,Owl,P3p,Pls,Rdf,Rdf Schema,Sisr,Skos,Smil,Soap,Srgs,Ssml,Svg,Sparql,Timed Text,Voicexml,Wsdl,Xforms,Xhtml+rdfa, | |
zote monety |