Skip to content

Commit 3c030a6

Browse files
authored
Add discouraged features for Function.prototype.{caller,arguments} and arguments.callee (#2664)
* Add discouraged feature for `Function.prototype.caller` and `arguments` Related-to: #2564 (comment) * Add discouraged feature for `arguments.callee` See-also: mdn/browser-compat-data#18384
1 parent 12125eb commit 3c030a6

4 files changed

+73
-0
lines changed

features/arguments-callee.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: arguments.callee
2+
description: The `callee` property of the `arguments` variable in a non-strict function body's local scope is the function that `arguments` belongs to.
3+
spec: https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-arguments-exotic-objects
4+
group: javascript
5+
discouraged:
6+
# From note 4: "The definition of this property […] exists to ensure that it
7+
# is not defined in any other manner by conforming ECMAScript
8+
# implementations."
9+
according_to:
10+
- https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-arguments-exotic-objects
11+
compat_features:
12+
- javascript.functions.arguments.callee

features/arguments-callee.yml.dist

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Generated from: arguments-callee.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.functions.arguments.callee
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Function caller and arguments
2+
description: The `caller` and `arguments` properties of a non-strict mode `Function` object are the function that called it and the arguments it was called with. Not to be confused with the `arguments` variable in a function body's local scope.
3+
group: javascript
4+
spec: https://tc39.es/ecma262/multipage/error-handling-and-language-extensions.html#sec-forbidden-extensions
5+
discouraged:
6+
according_to:
7+
- https://tc39.es/ecma262/multipage/error-handling-and-language-extensions.html#sec-forbidden-extensions
8+
compat_features:
9+
- javascript.builtins.Function.arguments
10+
- javascript.builtins.Function.caller
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Generated from: functions-caller-arguments.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+
# baseline: false
16+
# support:
17+
# chrome: "1"
18+
# chrome_android: "18"
19+
# edge: "12"
20+
# firefox: "1"
21+
# firefox_android: "4"
22+
# safari: "1"
23+
# safari_ios: "1"
24+
- javascript.builtins.Function.arguments
25+
26+
# ⬇️ Same status as overall feature ⬇️
27+
# baseline: false
28+
# support:
29+
# chrome: "1"
30+
# chrome_android: "18"
31+
# edge: "12"
32+
# firefox: "1"
33+
# firefox_android: "4"
34+
# safari: "3"
35+
# safari_ios: "1"
36+
- javascript.builtins.Function.caller

0 commit comments

Comments
 (0)