Boris Zbarsky wrote:
John J. Barton wrote:
I can use DOMNodeInserted to see elements put in, but I must be doing
this 'too soon', because the script panel logic decides the panel has
clientHeight zero, no room for any source lines.
I am running in the load handler for the window; the script panel is
in a browser:
window
browser
document
div <-- clientHeight 0
Unless there's something wacky going on, by the time that load handler
runs you should be able to get the correct clientHeight. Is it possible
to create a XUL file (small extension, or standalone XUL even better)
that shows the problem?
That said, what's the markup of that document containing the <div>?
Maybe 0 is the right height for that markup?
If so, then maybe my focus on clientHeight is wrong. What I need to know
is the pixel height of the browser element so I can compute the number
of source lines to render.
If I set a load handler on the browser from within the load handler
for the window, it never fires. I assume that means the load is
already complete.
Yeah; the onload for the window should wait for the browser onload if
the browser's src attribute is set in the markup.
Oh, that is the opposite of what I expected. Seems weird: how can I add
the load event handler on the contained browser unless I do it in the
window document load event handler?
Anyway I solved this problem by wrapping the code in a setTimeout. This
works but is unsatisfactory since I don't know what Firebug code will
run between the setTimeout registration and fire. Maybe none, maybe not.
jjb
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout