User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0 Iceweasel/33.1 Build ID: 20141111034249 Steps to reproduce: 1. Load this frame script: addEventListener("load", e => dump(e.target.documentURI + "\n")); 2. Load a page Actual results: Doesn't print URL Expected results: Print URL
You need to add the listener to capture phase. Load event dispatched to Window object doesn't bubble, and addEventListener defaults to bubble phase. So, pass true as the 3rd param.
You're right. Capture phase works. I mistook load event bubbles or not. Thanks.