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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea for browser support #8

Open
silverwind opened this issue Sep 6, 2022 · 2 comments
Open

Idea for browser support #8

silverwind opened this issue Sep 6, 2022 · 2 comments

Comments

@silverwind
Copy link

silverwind commented Sep 6, 2022

It might be possible to create and spawn a temporary web worker from a datauri, execute the regex within and then terminate it on timeout.

(Not really interested in implementing this, but it may be a nice exercise for someone 馃槈)

@sindresorhus
Copy link
Owner

Yeah, that could work. There are ways to make a web worker block the main process by using a shared array buffer.

@silverwind
Copy link
Author

silverwind commented Sep 6, 2022

Yeah, I guess the main challenge will not be to spawn the worker, but keep it all in synchronous code, so that the same API can be provided.

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

3 participants
@silverwind @sindresorhus and others