Talk:Document Object Model: Difference between revisions

Content deleted Content added
Strugee (talk | contribs)
Shadow DOM?: new section
Line 143:
====Random thoughts re DOM vs. the browser's internal data model====
I just watched [http://www.youtube.com/watch?v=WxmcDoAxdoY this video], linked by {{user|Qwerty0}} above. In that the speaker is pretty definite that the DOM ''is'' the data structure produced by the browser's parser. He's talking about HTML5, and there are now reference implementations of the perfect parser getting released, open source. These are written in Python, Java etc and are pretty certainly object oriented in their implementations. So what is the point in me trying to maintain some subtle distinction in my first bullet point just above, and the third bullet in my list above that one. So, I re-read [http://www.w3.org/TR/DOM-Level-2-Core/introduction.html this DOM Level 2] spec. In that the authors are pretty clear that the parser may not even be written in an OO language (guess, e.g. C), and so there is no way it can create the ''objects'' specified by the DOM spec: "The structure of SGML documents has traditionally been represented by an abstract data model, not by an object model." Therefore there is no necessary link between the internal data structure and the DOM, only a requirement to behave properly to incoming, valid, DOM-based, OO, script code: "The Document Object Model is not a set of data structures; it is an object model that specifies interfaces." Now, this article is about DOMs in general, not just the HTML5 DOM, so we need to maintain the distinctions required by other DOM specs, I think, at least until they are deprecated, or have really fallen out of use just about everywhere. That said, with free open-source, perfect, HTML5 parsers available, no one but an idiot would write their own - especially in a non-OO language - these days (and have to simulate all that OO DOM stuff from some other data structure). So, maybe there is no need to harp on about the older distinctions. Comments welcome. --[[User:Nigelj|Nigelj]] ([[User talk:Nigelj|talk]]) 01:28, 18 March 2012 (UTC)
 
== Shadow DOM? ==
 
Should there be a section of the article on the Shadow DOM (and related topics such as the "twilight DOM")?
See http://glazkov.com/2011/01/14/what-the-heck-is-shadow-dom/
[[User:Strugee|Strugee]] ([[User talk:Strugee|talk]]) 01:50, 22 April 2012 (UTC)