mirror of
https://github.com/Basilisk-Development-Team/UXP-mirror.git
synced 2026-11-05 09:40:21 -05:00
Per HTML spec: `document.currentScript` Returns null if the Document is not currently executing a script or SVG script element (e.g., because the running script is an event handler, or a timeout), or if the currently executing script or SVG script element represents a module script. --- It's ambiguous about whether, for micro tasks, it should return null. (This section is labelled as "non-normative", as well.) However, mainstream browsers handle this differently and don't return null after running microtasks, so we need to clear this and not assume null persistently, and run the auto-updater for it, regardless if it's a module or not.