Reputation: 16608
Please see this jsFiddle. Note that the click event works just fine (try clicking anywhere in the output), but not the document load event.
Upvotes: 0
Views: 69
Reputation: 322622
The document requires DOMContentLoaded
.
_bl_event(document, 'DOMContentLoaded', d1, false);
_bl_event(document, 'DOMContentLoaded', d2, false);
...though it isn't supported in all browsers.
Example: http://jsfiddle.net/bCtQQ/15/
This has different meaning from placing a load
handler on window
.
Upvotes: 2
Reputation: 16608
Ach, I finally got it — attaching the event to window
instead of document
seems to work much better.
Upvotes: 1