Closed Bug 529800 Opened 15 years ago Closed 14 years ago

[HTML5] Ensure script execution works right if the script is not in the parser's document when executed

Categories

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

defect

Tracking

()

RESOLVED DUPLICATE of bug 592366

People

(Reporter: hsivonen, Unassigned)

Details

It needs to be ensured the script execution works right if the script element (either itself or via an ancestor) has been moved to another document by the time the parser tells the script to run.

The script observer calls should fire on the sink belonging to the creator parser--not on the sink of the new owner document. (Need to test what happens now.)

Need to make sure the script gets the right script global object. (It's not immediately obvious to me from the spec what the right script global object is, but I expect it to be the global object of the parser's document--not the global object of the owner document.)

Thinking about this more, it seems to me I made the patch for bug 503473 needlessly complex in its way of storing the creator parser on the script element node, because I didn't understand the script execution code properly. That part should probably be revised here.
HTML5 says informatively that the script global object behaves in the opposite way compared to what I said above:
http://www.whatwg.org/specs/web-apps/current-work/#scripts-that-modify-the-page-as-it-is-being-parsed
Priority: -- → P3
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.