Skip to content

Commit 90f3498

Browse files
authored
Add several discouraged JavaScript features (#2670)
1 parent d3686ad commit 90f3498

14 files changed

+227
-0
lines changed

features/accessor-methods.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Accessor methods
2+
description: The `__defineGetter__()` and `__defineSetter__()` methods of objects bind a function to a property, which is called on setting or reading the property.
3+
spec: https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.prototype-legacy-accessor-methods
4+
discouraged:
5+
according_to:
6+
- https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers
7+
# No `alternatives` because it would be `alternatives:
8+
# [object-object, functions]`. In the future it'd be nice to have an
9+
# internal reference to the object defineProperty method and the function
10+
# get/set syntax.
11+
# See: https://github.com/web-platform-dx/web-features/issues/2676
12+
compat_features:
13+
- javascript.builtins.Object.defineGetter
14+
- javascript.builtins.Object.defineSetter
15+
- javascript.builtins.Object.lookupGetter
16+
- javascript.builtins.Object.lookupSetter

features/accessor-methods.yml.dist

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated from: accessor-methods.yml
2+
# Do not edit this file by hand. Edit the source file instead!
3+
4+
status:
5+
baseline: false
6+
support:
7+
chrome: "1"
8+
chrome_android: "18"
9+
edge: "12"
10+
firefox: "1"
11+
firefox_android: "4"
12+
safari: "3"
13+
safari_ios: "1"
14+
compat_features:
15+
- javascript.builtins.Object.defineGetter
16+
- javascript.builtins.Object.defineSetter
17+
- javascript.builtins.Object.lookupGetter
18+
- javascript.builtins.Object.lookupSetter

features/date-get-year-set-year.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: getYear() and setYear()
2+
description: The `getYear()` and `setYear()` methods of `Date` objects get and set the year as an offset to 1900.
3+
spec: https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-date.prototype.getyear
4+
group: javascript
5+
discouraged:
6+
according_to:
7+
- https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers
8+
# No `alternatives` because it would be `alternatives: [date]`. In the future
9+
# it'd be nice to have an internal reference to getFullYear() and
10+
# setFullYear() instead.
11+
# See: https://github.com/web-platform-dx/web-features/issues/2676
12+
compat_features:
13+
- javascript.builtins.Date.getYear
14+
- javascript.builtins.Date.setYear
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Generated from: date-get-year-set-year.yml
2+
# Do not edit this file by hand. Edit the source file instead!
3+
4+
status:
5+
baseline: false
6+
support:
7+
chrome: "1"
8+
chrome_android: "18"
9+
edge: "12"
10+
firefox: "1"
11+
firefox_android: "4"
12+
safari: "1"
13+
safari_ios: "1"
14+
compat_features:
15+
- javascript.builtins.Date.getYear
16+
- javascript.builtins.Date.setYear

features/date-to-gmt-string.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: toGMTString()
2+
description: The `toGMTSTring()` method of `Date` objects is an alias to the `toUTCString()` method.
3+
spec: https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-date.prototype.togmtstring
4+
discouraged:
5+
according_to:
6+
- https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers
7+
# No `alternatives` because it would be `alternatives: [date]`. In the future
8+
# it'd be nice to have an internal reference to the `toUTCString()` method
9+
# instead.
10+
# See: https://github.com/web-platform-dx/web-features/issues/2676
11+
compat_features:
12+
- javascript.builtins.Date.toGMTString

features/date-to-gmt-string.yml.dist

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Generated from: date-to-gmt-string.yml
2+
# Do not edit this file by hand. Edit the source file instead!
3+
4+
status:
5+
baseline: false
6+
support:
7+
chrome: "1"
8+
chrome_android: "18"
9+
edge: "12"
10+
firefox: "1"
11+
firefox_android: "4"
12+
safari: "1"
13+
safari_ios: "1"
14+
compat_features:
15+
- javascript.builtins.Date.toGMTString

features/escape-unescape.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: escape() and unescape()
2+
description: The `escape()` and `unescape()` built-in Javascript methods encode and unencode strings using percent encoding, where certain characters are replaced by hexidecimal escape sequences.
3+
spec: https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-escape-string
4+
group: javascript
5+
discouraged:
6+
according_to:
7+
- https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers
8+
# No `alternatives` because it would be `alternatives: [javascript]`. In the
9+
# future it'd be nice to have an internal reference to encodeURI(),
10+
# decodeURI(), encodeURIComponent(), and decodeURIComponent() instead.
11+
# See: https://github.com/web-platform-dx/web-features/issues/2676
12+
compat_features:
13+
- javascript.builtins.escape
14+
- javascript.builtins.unescape

features/escape-unescape.yml.dist

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Generated from: escape-unescape.yml
2+
# Do not edit this file by hand. Edit the source file instead!
3+
4+
status:
5+
baseline: false
6+
support:
7+
chrome: "1"
8+
chrome_android: "18"
9+
edge: "12"
10+
firefox: "1"
11+
firefox_android: "4"
12+
safari: "1"
13+
safari_ios: "1"
14+
compat_features:
15+
- javascript.builtins.escape
16+
- javascript.builtins.unescape

features/html-wrapper-methods.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: HTML wrapper methods
2+
description: JavaScript built-in methods such as, `String.bold()` and `String.italics()`, wrap strings in (often historic) HTML.
3+
spec: https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-properties-of-the-string.prototype-object
4+
group: javascript
5+
discouraged:
6+
according_to:
7+
- https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers
8+
alternatives:
9+
- dom
10+
compat_features:
11+
- javascript.builtins.String.anchor
12+
- javascript.builtins.String.big
13+
- javascript.builtins.String.blink
14+
- javascript.builtins.String.bold
15+
- javascript.builtins.String.fixed
16+
- javascript.builtins.String.fontcolor
17+
- javascript.builtins.String.fontsize
18+
- javascript.builtins.String.italics
19+
- javascript.builtins.String.link
20+
- javascript.builtins.String.small
21+
- javascript.builtins.String.strike
22+
- javascript.builtins.String.sub
23+
- javascript.builtins.String.substr
24+
- javascript.builtins.String.sup
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Generated from: html-wrapper-methods.yml
2+
# Do not edit this file by hand. Edit the source file instead!
3+
4+
status:
5+
baseline: false
6+
support:
7+
chrome: "1"
8+
chrome_android: "18"
9+
edge: "12"
10+
firefox: "1"
11+
firefox_android: "4"
12+
safari: "1"
13+
safari_ios: "1"
14+
compat_features:
15+
- javascript.builtins.String.anchor
16+
- javascript.builtins.String.big
17+
- javascript.builtins.String.blink
18+
- javascript.builtins.String.bold
19+
- javascript.builtins.String.fixed
20+
- javascript.builtins.String.fontcolor
21+
- javascript.builtins.String.fontsize
22+
- javascript.builtins.String.italics
23+
- javascript.builtins.String.link
24+
- javascript.builtins.String.small
25+
- javascript.builtins.String.strike
26+
- javascript.builtins.String.sub
27+
- javascript.builtins.String.substr
28+
- javascript.builtins.String.sup

features/proto.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: __proto__
2+
description: The `__proto__` property of objects partially exposes the prototype of an object.
3+
spec: https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.prototype.__proto__
4+
discouraged:
5+
according_to:
6+
- https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers
7+
# No `alternatives` because it would be `alternatives: [object]`. In the
8+
# future it'd be nice to have an internal reference to `getPrototypeOf()` and
9+
# `setPrototypeOf()` instead.
10+
# See: https://github.com/web-platform-dx/web-features/issues/2676
11+
compat_features:
12+
- javascript.builtins.Object.proto

features/proto.yml.dist

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Generated from: proto.yml
2+
# Do not edit this file by hand. Edit the source file instead!
3+
4+
status:
5+
baseline: false
6+
support:
7+
chrome: "1"
8+
chrome_android: "18"
9+
edge: "12"
10+
firefox: "1"
11+
firefox_android: "4"
12+
safari: "3"
13+
safari_ios: "1"
14+
compat_features:
15+
- javascript.builtins.Object.proto

features/regexp-compile.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: RegExp compile()
2+
description: The `compile()` method of `RegExp` objects recompiles an existing regular expression object using a new pattern and flags.
3+
spec: https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-regexp.prototype.compile
4+
discouraged:
5+
according_to:
6+
- https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers
7+
# No `alternatives` because it would be `alternatives: [regexp]`. In the
8+
# future it'd be nice to have an internal reference to the RegExp()
9+
# constructor instead.
10+
# See: https://github.com/web-platform-dx/web-features/issues/2676
11+
compat_features:
12+
- javascript.builtins.RegExp.compile

features/regexp-compile.yml.dist

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Generated from: regexp-compile.yml
2+
# Do not edit this file by hand. Edit the source file instead!
3+
4+
status:
5+
baseline: false
6+
support:
7+
chrome: "1"
8+
chrome_android: "18"
9+
edge: "12"
10+
firefox: "1"
11+
firefox_android: "4"
12+
safari: "3.1"
13+
safari_ios: "2"
14+
compat_features:
15+
- javascript.builtins.RegExp.compile

0 commit comments

Comments
 (0)