Hello Steve and everyone else,
I've been closely following ControlJS from its creation. I really like
the approach that it takes to async loading, but after doing a lot of
testing I found that the document.write wrapping was kind of a crap
shoot (especially when it comes to pesky little things like
I have started development on a library that takes the same approach
to enabling asynchronous pre-caching and synchronous execution of
scripts as ControlJS (in fact, it started as a fork), while also being
almost 100% document.write compatible.
The library attempts to buffer document.write calls and parse them as
closely to the way that a browser parses the original document as
possible, creating and inserting all new nodes using post-load-safe
DOM tree insertion methods. Using this technique, the library can
correctly load many obscure scenarios that the span + innerHTML
technique doesn't accomodate well for.
The library is currently being tracked on GitHub: https://github.com/cdata/dominatejs
It's kind of a behemoth right now, but I'm working on slimming it
down. Anyway, I wanted to put the word out there about this, and I'd
love to get some feedback from any of you on what you think and / or
how it could be improved!