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

RegExp.leftContext unsupported #921

Open
ammarahm-ed opened this issue Feb 19, 2025 · 2 comments · May be fixed by #923
Open

RegExp.leftContext unsupported #921

ammarahm-ed opened this issue Feb 19, 2025 · 2 comments · May be fixed by #923

Comments

@ammarahm-ed
Copy link
Contributor

ammarahm-ed commented Feb 19, 2025

Migrating a NativeScript project from v8 to use quickjs that uses [email protected] and I see this error.

Screenshot_2025-02-18_at_5.04.16_PM.png

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/leftContext

The API seems to be deprecated but it still works in the v8 engine. Is it possible to support this 🤔

@bnoordhuis
Copy link
Contributor

I looked into that a while ago but test262 has practically no coverage left (besides "does the property exist?") so it's hard to ensure it and other legacy properties function correctly.

I'm also not 100% positive they can be implemented without regressing performance of the common case. They're getters, not plain properties, so that helps, but you still need to store the state somewhere.

If you want to look into it, it's the legacy-regexp option in test262.conf, currently marked 'skip'.

@ammarahm-ed
Copy link
Contributor Author

@bnoordhuis thanks, I will see if I can add support for 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

Successfully merging a pull request may close this issue.

2 participants