Understanding how Javascipt interacts with DOM
Moderator: General Moderators
Understanding how Javascipt interacts with DOM
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
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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Re: Understanding how Javascipt interacts with DOM
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.
Is that what you wanted to know?
watch http://video.yahoo.com/watch/111582 for a better explaination - Douglas Crockford is awesomesauce.
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Re: Understanding how Javascipt interacts with DOM
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.