Jump to content

DOM scripting

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 65.65.71.253 (talk) at 18:27, 4 August 2009 (cleaning up external links). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

The term DOM scripting refers to programmatically accessing the Document Object Model (DOM). In common usage, DOM scripting implies JavaScript. DOM scripting has its roots in Dynamic HTML (DHTML), but is more structured. It is the third pillar in the web standards movement.

It has been suggested that DOM scripting is really no different from DHTML, as they are both accomplished by the same means and using the same tools. This suggestion holds that the creators of DOM scripting simply wanted a way to distinguish between what they saw as a "bad" style of implementing a dynamic web page and what they saw as a "good" style of implementation. Thus, they named the "bad" style DHTML, and the "good" style DOM scripting. In truth, there is no practical difference between the two, as any software development paradigm has the capacity to create both "good" and "bad" code simultaneously.

DHTML vs. DOM scripting

Traditional DHTML:
  • Uses a scripting language and valid markup (HTML/XHTML/XML/etc.)
  • May be browser-specific
  • May require code forking
  • Is web only
  • Was used with non-standardized markup
DOM scripting:
  • Uses a scripting language and valid markup (HTML/XHTML/XML/etc.)
  • Can be used with any programming/scripting language
  • Aims to be browser independent, is browser independent among standards-compliant broswers
  • Is web only
  • May degrade gracefully

Experiments