You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to both (my understanding of) the ES6 spec and firefox, Object.isExtensible should return true for functions (as they are considered object types)
However, es6-shim's Object.isExtensible returns false for functions because it uses Type.object instead of !Type.primitive for checking the argument.
As a practical example, this bug breaks Benvie's WeakMap shim when applied to functions.
I've just checked and the other usages of Type.object (seal, isSealed, freeze, isFrozed,preventExtensions) have the same issue according to MUO of the spec.
(Sidenote - why not add something like Benvie's WeakMap shim as a shim or sham? it seems well good enough)
The text was updated successfully, but these errors were encountered:
According to both (my understanding of) the ES6 spec and firefox, Object.isExtensible should return true for functions (as they are considered object types)
However, es6-shim's Object.isExtensible returns false for functions because it uses Type.object instead of !Type.primitive for checking the argument.
As a practical example, this bug breaks Benvie's WeakMap shim when applied to functions.
I've just checked and the other usages of Type.object (seal, isSealed, freeze, isFrozed,preventExtensions) have the same issue according to MUO of the spec.
(Sidenote - why not add something like Benvie's WeakMap shim as a shim or sham? it seems well good enough)
The text was updated successfully, but these errors were encountered: