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

Sginal should be polyfill to global #10

Open
yinxulai opened this issue May 17, 2024 · 2 comments
Open

Sginal should be polyfill to global #10

yinxulai opened this issue May 17, 2024 · 2 comments

Comments

@yinxulai
Copy link

This package is named a "*-polyfill", but its behavior is quite different from other typical polyfills. Most polyfills register the target to the global or tagetprototype, such as:

promise-polyfill
object.assign
Array.prototype.map

We should consider whether this approach is appropriate, and whether the current implementation makes it difficult for multiple packages to share the same polyfill.

@ljharb
Copy link

ljharb commented May 17, 2024

I maintain the second two, and no, they do not automatically modify the global - quite intentionally, as that behavior is dangerous.

Providing an opt-in mechanism to do so would be great, though, although i hope it would wait until the proposal is at stage 3.

@yinxulai
Copy link
Author

yinxulai commented May 18, 2024

Providing an opt-in mechanism to do so would be grea

This is great, this allows me to call Signal in a more good way, what can I do to help we achieve this?

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

No branches or pull requests

2 participants