Page 1 of 1

Understanding how Javascipt interacts with DOM

Posted: Wed Jun 25, 2008 9:07 pm
by legend986
I was wondering if someone could point me towards some resource that explains the how Javascript interacts with DOM. As far as I have read, there are direct api calls to access nodes and children, but I want to know what happens internally (maybe at the memory level or pointers level). Can someone please advice me?

Re: Understanding how Javascipt interacts with DOM

Posted: Thu Jun 26, 2008 12:03 pm
by pickle
Each browser implements Javascript differently. You're asking for how the Javascript engine allocates memory & all that. The only browsers you could possibly find that information for are open-source (like Firefox). You'll have to sort through the developer's area & possibly source code to find that.

Re: Understanding how Javascipt interacts with DOM

Posted: Thu Jun 26, 2008 12:51 pm
by Kieran Huggins
The DOM is represented by a javascript object, using "window" as it's global scope. Many built-in node-specific methods (like node.attr and node.getElementById()) are implemented by the browser's javascript engine.

Is that what you wanted to know?

watch http://video.yahoo.com/watch/111582 for a better explaination - Douglas Crockford is awesomesauce.

Re: Understanding how Javascipt interacts with DOM

Posted: Thu Jun 26, 2008 3:07 pm
by Ollie Saunders
The W3C's spec defines how the DOM should function after that it's up to browser vendors to decide how to implement it. There may be pages on Mozillazine about it also try asking various browser devs on irc or something.