|
Posted by Toby Inkster on 05/18/06 09:26
Bob wrote:
> DOM is basically CSS + Javascript
Not really -- these three concepts are fairly independent -- as
independent as, say, HTML and CSS[1][2]. There are browsers that
support a DOM but not CSS[3]; and browsers that allow you to
manipulate the DOM without using Javascript[4].
You may be thinking of "DHTML" which is an old buzz-word for
HTML + DOM + CSS + Javascript.
The DOM is basically a tree structure that the browser creates in
memory when it parses an HTML document[5], and (if the browser
supports CSS) will also have styling information attached as "leaves".
This tree (including all its branches and leaves) can then be
inspected and manipulated using Javascript, or any other scripting
language that the host browser offers[6]. As the tree is manipulated
the browser updates the display of the page to match, allowing
for DOM manipulation to produce dynamic effects on-page.
____
1. CSS can be used to style non-HTML documents -- e.g. RSS.
2. HTML can be styled using non-CSS style sheets -- e.g. JSSS
(Netscape 4.x)
3. Netscape 2 and 3.
4. Internet Explorer 4+ on Windows, with VBScript.
5. Any structured document can have a DOM, but HTML and XML are
most common.
6. As per #4, VBScript is supported in some browsers. Mozilla's
roadmap includes the ability to "plug in" scripting modules allowing
DOM scripting in Perl, Python, etc:
http://www.mozilla.org/scriptable/agnostic.html
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Navigation:
[Reply to this message]
|