From the Blink Blog:Finally wed like to explore even larger ideas like moving the entire Document Object Model (DOM) into JavaScript.What does this mean? Does it mean WebKit's DOM is currently not coded in JavaScript but in some other language? Does it mean that they want to expose more public accessors to the DOM? Or what?
Google Blink (new WebKit fork): Meaning of Moving DOM into Javascript?
javascript;dom
The way I read it there are two options. But before we look into this, you have to understand how the old model works.In most, if not all implementations of HTML rendering engines, the DOM is implemented in C or C++ and the JavaScript engine is an add-on that has bindings exported to the DOM. This makes sense, if you look at how HTML and JavaScript evolved. But a lot of time is wasted in marshaling the calls from JavaScript to C/C++ and back.The first option is that the DOM becomes more closely bound to the JavaScript engine. Basically the DOM objects becomes core JavaScript objects, like Array. This does not do much except reduce some marshaling, since the DOM uses the native data types from the JavaScript engine. The DOM is then still implemented in C or C++.The second option and probably what they mean, is that the actual DOM is implemented in JavaScript. The downside is that the access to the DOM is fully interpreted, but on the upside it removes any marshaling. This is probably a net gain, since the DOM is mostly data anyway.Then again I can't give you a definite answer - I don't work for Google and thus don't have that much insight. 