DOM level 2
Is addeventlistener at DOM level 2 ? what else is in DOM level 2 and what is the different between DOM level 1 and 2 ?
That's a broad question. Maybe a Google search will provide quicker and more detailed answered.
Give me some elements in DOM level 2
DOM means a model of referring and interacting with the HTML (and XML) Elements. Therefor, the DOM levels are versions of an interacting model. not versions of the HTML language. You will not find new elements in DOM 2, but you will find new ways to find, represent and interact with the same HTML elements.
And yes, addEventListener is a method added in DOM 2, along with a specific event model . DOM 2 standardized also the getElementById, getElementsByTagName, getElementsByName. And the keyboard event handling. And many others...
Why do you asked that?
getelementbyid from what i read is in DOM level 1 ?
Could be. Who cares, after all? Are you writing the history of DOM, or what?
Originally Posted by stevengoh
2 should really be 1 since "0" was 1, but version numbers on web techs are always a mess.
the dom as of 4 years ago is dom2: http://www.w3.org/TR/DOM-Level-2-Core/expanded-toc.html
most print media refers to this dom, and most of the features are still used today.
dom2 basically solidified the existing Netscape and MS doms. I'd say adding namespace support was the biggest over-all change. i can see it trying to use the same interface for html and xml, and being released ion 2000 hot on the heels of xhtml, you can guess that xmlishness was indeed the main focus. i think normalize(), textContent, replaceChild(), and isSupported() were first codified in 2, if memory serves me correct.
I still people using Node.data to this day; just because something's formalized, doesn't mean it's popular.
dom3 added children, draggable, dataset, classList, querySelectorAll, and a few other nice methods.
we are now on 4 if anyone is still counting.
the recent changes basically tone down Node(), so that attrib nodes and the like are not still referred to by iterating just dumb nodes. also form validation, nextElementSibling, and a few other lazy methods were added.
Create, Share, and Debug HTML pages and snippets with a cool new web app I helped create: pagedemos.com
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)