This question ( Weird browser / ajax error : Extra junk appears at the end of javascript files in firefox ) set me thinking ... I know what happens when I dynamically update the DOM on a web, page. At least, there's a tree of nodes representing the document and I can modify it.
But where does a browser put Javascript? How does a library like YUI dynamically load extra code?