Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing events to browser, worker, service worker envs #192

Conversation

disce-omnes
Copy link
Contributor

Presence of globals was checked in Chrome v103.0.5060.114.

@sindresorhus
Copy link
Owner

sindresorhus commented Jul 20, 2022

Some of these are available in Node.js and should be added to its environment too. And also shared-node-browser.

@disce-omnes
Copy link
Contributor Author

In Node v16.16.0 all of these globals cause ReferenceError. Except for Event, which is already present in node & shared-node-browser envs.

@sindresorhus
Copy link
Owner

You have to check Node.js 18 (the latest minor).

@disce-omnes
Copy link
Contributor Author

Same result (ReferenceError) with Node v18.6.0.

@sindresorhus
Copy link
Owner

❯ node
Welcome to Node.js v18.4.0.
Type ".help" for more information.
> MessageEvent
[class MessageEvent extends Event]
>

@disce-omnes
Copy link
Contributor Author

You're right, I didn't mention MessageEvent in PR description and so I overlooked it when checking. However MessageEvent is already present in node & shared-node-browser envs.

@sindresorhus sindresorhus merged commit 0bfae5d into sindresorhus:main Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants