-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
[Merged by Bors] - Implement escape
and unescape
#2768
Conversation
Test262 conformance changes
Fixed tests (70):
|
Codecov Report
@@ Coverage Diff @@
## main #2768 +/- ##
==========================================
- Coverage 50.98% 50.92% -0.07%
==========================================
Files 409 410 +1
Lines 40759 40849 +90
==========================================
+ Hits 20781 20802 +21
- Misses 19978 20047 +69
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks great to me, but I would put this behind a feature flag, since this should only be enabled for browsers:
When the ECMAScript host is a web browser the following additional properties of the standard built-in objects are defined.
Thought about it, but I checked Node and Deno and both have these functions enabled, probably because of compatibility purposes... Though, we have plans for feature gating all builtins anyways, so maybe it should be fine to gate them, then add them to the default set of features? |
I would feature gate them and add them to the default set, but in the future, I can imagine having:
Then, I would like to have one feature for each feature in test262, ideally, or at least one feature per built-in + async/await + generators... in case users would like to block some functionality. They should also be able to create a context with no features and cherry pick the built-ins at runtime, for example. But this is out of this PR, of course. I would still add the feature gate, though :) |
Right now this is missing |
Remind me to not push changes at 4am again 🙃 Thanks for the catch! |
Ok, all tests are passing for me and I gated the functions behind an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! :)
bors r+ |
<!--- Thank you for contributing to Boa! Please fill out the template below, and remove or add any information as you feel necessary. ---> This Pull Request implements the [`escape`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/escape) and [`unescape`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/unescape) functions. Both are technically deprecated, but they're also part of the [Additional ECMAScript Features for Web Browsers](https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers) section, so it is preferable to have them in place.
Pull request successfully merged into main. Build succeeded: |
escape
and unescape
escape
and unescape
This Pull Request implements the
escape
andunescape
functions.Both are technically deprecated, but they're also part of the Additional ECMAScript Features for Web Browsers section, so it is preferable to have them in place.