>> Le 8 déc. 2019 à 14:43, Jack Works <[email protected]> a écrit :
>
> In the current spec, strictness of the built-in functions are
> implementation-dependent behaviors. This proposal is going to fix this
> problem.
> https://github.com/Jack-Works/proposal-strict-built-in-functions
>
Hi,
See https://github.com/tc39/ecma262/issues/562#issuecomment-218531285 for
another testcase.
The real problem is that the semantics of `f.caller` is left to
implementations. There are in fact some restrictions in the spec, see
https://tc39.es/ecma262/#sec-forbidden-extensions, but they are insufficient.
Note that it doesn’t really make sense to mandate that builtin functions be
“strict”: The notion of strictness is defined only for so-called ECMAScript
functions, which are functions whose implementation is written in ECMAScript
code. That excludes builtin functions (unless the implementation choose to
implement them in ECMAScript), but also bound functions, proxies, and probably
some other cases.
—Claude
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss