Skip to content

Align JavaScript StorageEvent externs with current Web IDL - #22852

Draft
asgerf with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-storage-event-constructor
Draft

asgerf with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-storage-event-constructor

Conversation

Copilot AI commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

The zero-argument StorageEvent model causes false positives on valid browser constructor calls. Its legacy initializer also incorrectly marks optional parameters as required.

  • Constructor: Require type and accept an optional StorageEventInit dictionary with inherited event options.
  • Initializer: Make arguments after type optional and correct key nullability.
  • Regression coverage: Cover valid constructor calls and retain detection of excess arguments.
new StorageEvent("storage", { key: "k", newValue: "v" });

Co-authored-by: asgerf <316427+asgerf@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix StorageEvent constructor to accept arguments Align JavaScript StorageEvent externs with current Web IDL Oct 20, 2026
Copilot AI requested a review from asgerf October 20, 2026 13:00
@github-actions github-actions Bot added the JS label Oct 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JavaScript externs model StorageEvent() with no type argument

2 participants