David-Sarah Hopwood wrote:
> Allen Wirfs-Brock wrote:
[...]
>> 6) bound functions have a "prototype" property that is initialized to the
>> value
>> of the target function's "prototype" property. Both construction and
>> instanceOf use the bound function's "prototype" value.
>
> 6a) bound functions have a "prototype" property that is initialized to
> the value of the target function's "prototype" property, and is
> non-[[Writable]] and non-[[Configurable]]. Both construction and
> instanceof use the bound function's "prototype" property.
6b) bound functions have a "prototype" property that is initialized to
the value of the target function's "prototype" property, and are
sealed objects. Both construction and instanceof use the bound
function's "prototype" property.
The argument for 6b) is that existing code probably does not rely on bound
functions to be mutable. So, making them sealed enhances security without
requiring an explicit call to Object.seal.
--
David-Sarah Hopwood ⚥
_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss