arguments.callee
arguments.callee データプロパティは、引数が属する現在実行中の関数を保持しています。
対応ブラウザ
| 機能 | デスクトップ | モバイル | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
callee 非推奨 | 1 | 12 | 1 | 1 | 18 | 1 |
ライブデモ
Recursive call with arguments.callee
Use the legacy recursive pattern inside a non-strict function expression.
JavaScript
出力
「実行」ボタンを押してください
Anonymous function recursion
Show how arguments.callee was used before naming the function directly.
JavaScript
出力
「実行」ボタンを押してください
Compare with a named function
Contrast the legacy pattern with the modern named-function approach.
JavaScript
出力
「実行」ボタンを押してください
実務での使いどころ
-
arguments.callee の活用
arguments.callee データプロパティは、引数が属する現在実行中の関数を保持しています。
注意点
- 一部のブラウザでのみ対応。使用前にブラウザサポートを確認すること。
アクセシビリティ
- JavaScript による動的更新時は、aria-live リージョンで変更をスクリーンリーダーに通知する。