Open
Bug 329514
Opened 15 years ago
Updated 3 years ago
Sort out the exact behavior for *LOAD events
Categories
(Core :: DOM: Events, defect, P5)
Core
DOM: Events
Tracking
()
NEW
People
(Reporter: smaug, Unassigned)
References
Details
Reporter | ||
Comment 1•15 years ago
|
||
We should sort out the exact behavior for *LOAD events. See also https://bugzilla.mozilla.org/show_bug.cgi?id=51211#c37
Depends on: 234455
![]() |
||
Comment 2•15 years ago
|
||
So the current behavior when someone attaches a load listener to the tabbrowser in Firefox is: 1) Capturing listener -- see loads for documents and for <xul:image>s in the tabbrowser. 2) Bubbling listener -- see no load events. Presumably that's why http://kb.mozillazine.org/On_page_load uses a capturing listener.... Any idea why the load listeners see nothing there?
Flags: blocking1.9a1?
Reporter | ||
Comment 3•15 years ago
|
||
(In reply to comment #2) > > Presumably that's why http://kb.mozillazine.org/On_page_load uses a capturing > listener.... > It uses bubbling listener. window.addEventListener("load", function() { myExtension.init(); }, false);
Comment 4•15 years ago
|
||
The bubbling listener is for extension initialization routine - it only needs to run when the chrome window loads. The capturing listener is registered on the parent of gBrowser - and is called for content load events.
![]() |
||
Comment 5•15 years ago
|
||
smaug, I meant this part: appcontent.addEventListener("load", this.onPageLoad, true); ... messagepane.addEventListener("load", this.onPageLoad, true); But I've thought about it, and I see what's going on. Load events don't bubble (for documents too). That's fine (and fixes bug 196057). But then the problem is that the the load event for a window is fired on its <browser> (due to the code in nsGlobalWindow::PostHandleEvent) but doesn't propagate from there. In particular, there's no load event fired on the <tabbrowser> (much less the node the Mozillazine code is messing with). As I see it, there are two options here: 1) We could make load events "bubble" up to binding parents (but not other bubbling). 2) We could make tabbrowser add load listeners to its browsers and fire a load event at itself when those fire. The problem is getting the right target or originalTarget or whatever in that load event -- the target should arguably be the document or window that finished loading. Do we get that correct right now when we re-fire the load on our frame element? I'm frankly somewhat partial to solution #1; we've discussed something like that before, I think.
Flags: blocking1.9a1? → blocking1.9-
Whiteboard: [wanted-1.9]
Updated•13 years ago
|
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
Updated•12 years ago
|
Assignee: events → nobody
QA Contact: ian → events
Comment 6•3 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
You need to log in
before you can comment on or make changes to this bug.
Description
•