Quote:
Originally Posted by kovidgoyal
I put the alert into images.js and it is run only once for for me per load of an html file
|
Yes, indeed. The problem is that it should not run at all!
You explained that the script engine is not loaded anymore
at the beginning, but rather after the full page is loaded.
If I understand correctly, this necessarily means that the
ready event can not be handled via jQuery, because the DOM
is ready before the HTML parser is JavaScript aware.
What I see is that the when I invoke the reader, it shows an
spinner and a message saying “loading document flow”. After
it finishes, my script is fired and the document
rearranged in two columns, but somehow grayed out.
Later on, after a second or so, the two columns layout disappears.
I suggested the theory that maybe the document is rendered
twice and that the script engine is loaded, unloaded and loaded
again. But, I may be off by miles