Script doesn't run if it's reinserted passing the "type" attribute preparation check after previously failing the "type" preparation check
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: lukew, Unassigned)
Details
(Keywords: parity-chrome)
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0
Steps to reproduce:
I wrote a test for the "prepare a script" algorithm (https://html.spec.whatwg.org/multipage/scripting.html#prepare-a-script) to test steps 6, 7 and 8 to see what happens if you fail them the first time you insert the script, but pass them the second time you insert the script. I have attached this test as a file.
Actual results:
In Firefox 93 and Nightly, I got:
- Step 6 test: I ran the second time around!
- Step 7 test: I ran the second time around!
Expected results:
I expected the test to print:
- Step 6 test: I ran the second time around!
- Step 7 test: I ran the second time around!
- Step 8 test: I ran the second time around!
This is because step 8 (the "type" attribute check) comes before step 10 which sets the already started flag that prevents the script from being prepared again because of step 1.
I get the expected result in both Chrome and iOS Safari.
Comment 1•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Core & HTML' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Description
•