-
Notifications
You must be signed in to change notification settings - Fork 107
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
ECMAScript discouraged/legacy feature #2564
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: JavaScript built-ins (legacy) | ||
description: | ||
spec: https://tc39.es/ecma262/multipage/ | ||
group: javascript | ||
discouraged: | ||
according_to: | ||
- https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers | ||
- https://tc39.es/ecma262/#sec-object.prototype-legacy-accessor-methods | ||
- https://tc39.es/ecma262/#sec-object.prototype.__proto__ | ||
compat_features: | ||
# The following properties are legacy according to: | ||
# https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers | ||
- javascript.builtins.escape | ||
- javascript.builtins.unescape | ||
- javascript.builtins.String.anchor | ||
- javascript.builtins.String.big | ||
- javascript.builtins.String.blink | ||
- javascript.builtins.String.bold | ||
- javascript.builtins.String.fixed | ||
- javascript.builtins.String.fontcolor | ||
- javascript.builtins.String.fontsize | ||
- javascript.builtins.String.italics | ||
- javascript.builtins.String.link | ||
- javascript.builtins.String.small | ||
- javascript.builtins.String.strike | ||
- javascript.builtins.String.sub | ||
- javascript.builtins.String.substr | ||
- javascript.builtins.String.sup | ||
Comment on lines
+15
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These also look like they might work better as standalone HTML wrapper methods feature, an alternative being the |
||
- javascript.builtins.Date.getYear | ||
- javascript.builtins.Date.setYear | ||
Comment on lines
+29
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess these two could make sense together as well. |
||
- javascript.builtins.Date.toGMTString | ||
- javascript.builtins.RegExp.compile | ||
|
||
# The following properties are legacy according to: | ||
# https://tc39.es/ecma262/#sec-object.prototype-legacy-accessor-methods | ||
- javascript.builtins.Object.defineGetter | ||
- javascript.builtins.Object.defineSetter | ||
- javascript.builtins.Object.lookupGetter | ||
- javascript.builtins.Object.lookupSetter | ||
Comment on lines
+34
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one could be a "__defineGetter__() and __defineSetter__()" feature. For now it could have |
||
|
||
# The following properties are legacy according to: | ||
# https://tc39.es/ecma262/#sec-object.prototype.__proto__ | ||
- javascript.builtins.Object.proto | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that I've gotten to the end, I'm left with just a few miscellaneous, single-key items:
This isn't too bad? I'd be willing to tolerate having features for these, if it makes the consistency and shape of the other features mentioned above more legible. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Generated from: javascript-discouraged.yml | ||
# Do not edit this file by hand. Edit the source file instead! | ||
|
||
status: | ||
baseline: false | ||
support: | ||
chrome: "1" | ||
chrome_android: "18" | ||
edge: "12" | ||
firefox: "1" | ||
firefox_android: "4" | ||
safari: "3.1" | ||
safari_ios: "2" | ||
compat_features: | ||
# baseline: false | ||
# support: | ||
# chrome: "1" | ||
# chrome_android: "18" | ||
# edge: "12" | ||
# firefox: "1" | ||
# firefox_android: "4" | ||
# safari: "1" | ||
# safari_ios: "1" | ||
- javascript.builtins.Date.getYear | ||
- javascript.builtins.Date.setYear | ||
- javascript.builtins.Date.toGMTString | ||
- javascript.builtins.String.anchor | ||
- javascript.builtins.String.big | ||
- javascript.builtins.String.blink | ||
- javascript.builtins.String.bold | ||
- javascript.builtins.String.fixed | ||
- javascript.builtins.String.fontcolor | ||
- javascript.builtins.String.fontsize | ||
- javascript.builtins.String.italics | ||
- javascript.builtins.String.link | ||
- javascript.builtins.String.small | ||
- javascript.builtins.String.strike | ||
- javascript.builtins.String.sub | ||
- javascript.builtins.String.substr | ||
- javascript.builtins.String.sup | ||
- javascript.builtins.escape | ||
- javascript.builtins.unescape | ||
|
||
# baseline: false | ||
# support: | ||
# chrome: "1" | ||
# chrome_android: "18" | ||
# edge: "12" | ||
# firefox: "1" | ||
# firefox_android: "4" | ||
# safari: "3" | ||
# safari_ios: "1" | ||
- javascript.builtins.Object.defineGetter | ||
- javascript.builtins.Object.defineSetter | ||
- javascript.builtins.Object.lookupGetter | ||
- javascript.builtins.Object.lookupSetter | ||
- javascript.builtins.Object.proto | ||
|
||
# ⬇️ Same status as overall feature ⬇️ | ||
# baseline: false | ||
# support: | ||
# chrome: "1" | ||
# chrome_android: "18" | ||
# edge: "12" | ||
# firefox: "1" | ||
# firefox_android: "4" | ||
# safari: "3.1" | ||
# safari_ios: "2" | ||
- javascript.builtins.RegExp.compile |
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.
I think breaking this out into a separate feature (something like "escape() and unescape()") would help us do better discouragement information. We don't have all the data for this yet (it'd be nice to reference an "internal" feature on
javascript
forencodeURIComponent()
and friends) but I'm thinking ahead here about how a consumer like MDN might be able to use this data for useful developer content (as on the current MDN page).