Open Bug 1735590 Opened 4 years ago Updated 4 years ago

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)

Firefox 93
defect

Tracking

()

UNCONFIRMED

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.

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.

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
Component: DOM: Core & HTML → DOM: HTML Parser
Keywords: parity-chrome
Severity: -- → S2
Component: DOM: HTML Parser → DOM: Core & HTML
Severity: S2 → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: