From 241e3054b0f1f35761767e003a334bd17976fc50 Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Mon, 17 Feb 2025 12:12:53 +0100 Subject: [PATCH 1/2] Add discouraged feature for `Function.prototype.caller` and `arguments` Related-to: https://github.com/web-platform-dx/web-features/pull/2564#issuecomment-2607858771 --- features/functions-caller-arguments.yml | 10 ++++++ features/functions-caller-arguments.yml.dist | 36 ++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 features/functions-caller-arguments.yml create mode 100644 features/functions-caller-arguments.yml.dist diff --git a/features/functions-caller-arguments.yml b/features/functions-caller-arguments.yml new file mode 100644 index 00000000000..7a2be05810e --- /dev/null +++ b/features/functions-caller-arguments.yml @@ -0,0 +1,10 @@ +name: Function caller and arguments +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. +group: javascript +spec: https://tc39.es/ecma262/multipage/error-handling-and-language-extensions.html#sec-forbidden-extensions +discouraged: + according_to: + - https://tc39.es/ecma262/multipage/error-handling-and-language-extensions.html#sec-forbidden-extensions +compat_features: + - javascript.builtins.Function.arguments + - javascript.builtins.Function.caller diff --git a/features/functions-caller-arguments.yml.dist b/features/functions-caller-arguments.yml.dist new file mode 100644 index 00000000000..f4fc75cabe4 --- /dev/null +++ b/features/functions-caller-arguments.yml.dist @@ -0,0 +1,36 @@ +# Generated from: functions-caller-arguments.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" + safari_ios: "1" +compat_features: + # baseline: false + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "1" + # firefox_android: "4" + # safari: "1" + # safari_ios: "1" + - javascript.builtins.Function.arguments + + # ⬇️ Same status as overall feature ⬇️ + # baseline: false + # support: + # chrome: "1" + # chrome_android: "18" + # edge: "12" + # firefox: "1" + # firefox_android: "4" + # safari: "3" + # safari_ios: "1" + - javascript.builtins.Function.caller From 88e2f2ff4619e29ea35be6078c8a2d4cd5f7f2ee Mon Sep 17 00:00:00 2001 From: "Daniel D. Beck" Date: Mon, 17 Feb 2025 13:12:51 +0100 Subject: [PATCH 2/2] Add discouraged feature for `arguments.callee` See-also: https://github.com/mdn/browser-compat-data/pull/18384 --- features/arguments-callee.yml | 12 ++++++++++++ features/arguments-callee.yml.dist | 15 +++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 features/arguments-callee.yml create mode 100644 features/arguments-callee.yml.dist diff --git a/features/arguments-callee.yml b/features/arguments-callee.yml new file mode 100644 index 00000000000..835e4e4d3bb --- /dev/null +++ b/features/arguments-callee.yml @@ -0,0 +1,12 @@ +name: arguments.callee +description: The `callee` property of the `arguments` variable in a non-strict function body's local scope is the function that `arguments` belongs to. +spec: https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-arguments-exotic-objects +group: javascript +discouraged: + # From note 4: "The definition of this property […] exists to ensure that it + # is not defined in any other manner by conforming ECMAScript + # implementations." + according_to: + - https://tc39.es/ecma262/multipage/ordinary-and-exotic-objects-behaviours.html#sec-arguments-exotic-objects +compat_features: + - javascript.functions.arguments.callee diff --git a/features/arguments-callee.yml.dist b/features/arguments-callee.yml.dist new file mode 100644 index 00000000000..1d86c97ca9d --- /dev/null +++ b/features/arguments-callee.yml.dist @@ -0,0 +1,15 @@ +# Generated from: arguments-callee.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: "1" + safari_ios: "1" +compat_features: + - javascript.functions.arguments.callee