Open Bug 1421590 Opened 7 years ago Updated 2 years ago

IFrame loading aborted or reset if external script is contained

Categories

(Core :: DOM: Core & HTML, defect, P3)

57 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: stefan.martin, Unassigned)

Details

Attachments

(1 file)

2.62 KB, application/x-7z-compressed
Details
Attached file FirefoxBug1.7z
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36 Steps to reproduce: I have extracted code from a larger project which writes to an iframe using "document.write". Everything works fine as long as the code is either executed directly or through "window.eval". It fails if the code is executed through a script element. You can find my test page in the attachment. Actual results: I Firefox the iframe written by clicking on button "RUN EVAL" loads successfully, but the iframe written by clicking on button "RUN SCRIPT" seems to be aborted or reset at the point where an external script file is loaded. I have tried the same page with Chrome, IE, Edge and Safari without any issues. Expected results: You should see an image displayed in the iframes on success.
Component: Untriaged → Document Navigation
Product: Firefox → Core
I got an error message on console that <script> from 「file:///C:/Users/Mozilla/AppData/Local/Temp/BNZ.5a1fcbfca5407d3/FirefoxBug1_file1.js?head」 load failed. :baku, do you know what's up here?
Flags: needinfo?(amarchesini)
Flags: needinfo?(amarchesini)
I suspect security issues but Anne can likely confirm.
Component: Document Navigation → DOM
Flags: needinfo?(annevk)
Priority: -- → P3
Unless this is really about file: URLs, I suspect this is about an interoperability issue with the HTML parser, explained at https://jakearchibald.com/2016/fun-hacks-faster-content/#using-iframes-and-documentwrite-to-improve-performance and reported to the HTML standard at https://github.com/whatwg/html/issues/2137. There's no obvious next step here other than doing a bunch of research around script execution.
Flags: needinfo?(annevk)
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: