Why was the arguments.callee.caller property deprecated in JavaScript?

Why was the arguments.callee.caller building deprecated in JavaScript?

It was included and afterwards deprecated in JavaScript, yet it was left out completely by ECMAScript. Some internet browser (Mozilla, IE) have actually constantly sustained it and also do not have any kind of intend on the map to remove assistance. Others (Safari, Opera) have actually taken on assistance for it, yet assistance on older internet browsers is unstable.

Exists an excellent factor to place this beneficial capability in limbo?

(Or at the same time, exists a far better means to order a take care of on the calling function?)

2022-07-06 00:02:49
Source Share
Answers: 1

It is far better to make use of called features than arguments.callee:

 function foo () {
     ... foo() ...

is far better than

 function () {
     ... arguments.callee() ...

The called function will certainly have accessibility to its customer via the caller property:

 function foo () {

which is far better than

 function foo () {

The deprecation results from existing ECMAScript design principles.

2022-07-06 03:11:00