On 1/11/12 6:59 AM, Simon Pieters wrote:
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1297
Might not be cross-browser yet (e.g. Opera seems to run the image's
onload handler), but should work per spec I think. Well, the load can't
be prevented if it's speculatively loaded it before the script has
executed, but maybe that's fine for the use case.
This also doesn't prevent rendering (which can easily start before
DOMContentLoaded), doesn't prevent execution of script in the document
that's being loaded, etc.
Again, the hard part of doing a transformation on HTML is not doing the
transformation; it's preventing the transformation source document from
being treated "as usual".
-Boris