It looks like `ScriptElement::MaybeProcessScript` violates the [spec for preparing an element](https://html.spec.whatwg.org/#prepare-the-script-element), in that it performs step 14 (setting `mAlreadyStarted` to true) before steps 8-12 (checking the script type).
Bug 1827512 Comment 6 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
It looks like `ScriptElement::MaybeProcessScript` violates the [spec for preparing an element](https://html.spec.whatwg.org/#prepare-the-script-element), in that it performs step 14 (setting `mAlreadyStarted` to true) before steps 8-12 (checking the script type). Which would cause the difference in behaviour seen here.
It looks like [`ScriptElement::MaybeProcessScript`](https://searchfox.org/mozilla-central/source/dom/script/ScriptElement.cpp#91) violates the [spec for preparing an element](https://html.spec.whatwg.org/#prepare-the-script-element), in that it performs step 14 (setting `mAlreadyStarted` to true) before steps 8-12 (checking the script type). Which would cause the difference in behaviour seen here.