Yeah, pdfWindow in the example can't be accessed. So onload is added to the window when it has the initial about:blank, and load event is fired on the new inner window. How can this work on other browsers, what is event.target when it fires? Looks like Chrome exposes the "pdf" document to the caller, and that document has <embed> which has then the pdf. Hmm, and various Chrome internal stuff is exposed to the web there. internalid="<some magic number>" and such.
Bug 1945551 Comment 4 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Yeah, pdfWindow in the example can't be accessed. So onload is added to the window when it has the initial about:blank, and load event is fired on the new inner window. How can this work on other browsers, what is event.target when it fires? Looks like Chrome exposes the "pdf" document to the caller, and that document has <embed> which has then the pdf. Hmm, and various Chrome internal stuff is exposed to the web there. internalid="<some magic number>" and such. webkit (Gnome Web at least), seems to use an iframe there, not embed.