Understanding how Javascipt interacts with DOM

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
legend986
Forum Contributor
Posts: 258
Joined: Sun Jul 15, 2007 2:45 pm

Understanding how Javascipt interacts with DOM

Post 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?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Understanding how Javascipt interacts with DOM

Post 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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
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

Post 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.
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Re: Understanding how Javascipt interacts with DOM

Post 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.
Post Reply