Today I have fixed an old problem. When the browser did neither support XMLHttpRequest nor document.getElementsByTagName(), then the old package.js would fall back to document.write(). This is great at page loading time, but as soon as you have deppending packages or try to load packages on demand, this breaks.
The emulation recurses through all elements on the page and it is called each time a package is loaded. So this is really slow, but at least it works.
Since I was there at the source code I put in some comments to improve maintainability.