We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This code breaks Function.prototype.name in 100% of cases
Function.prototype.name
var funcNameBeforeProtoCall = (function bar() {}).name var funcNameBeforeProtoCallEquals = funcNameBeforeProtoCall === 'bar'; debugger; Function.prototype.name; var funcNameAfterProtoCall = (function foo() {}).name var funcNameAfterProtoCallEquals = funcNameAfterProtoCall === 'foo'; debugger
launchable code: https://codepen.io/ColCh/pen/Oqpqqp
Try it in IE 11 and this would be resulted in this:
WHY ?!
Because this code is executed against this variable of Function.prototype
this
Function.prototype
es6-shim/es6-sham.js
Lines 158 to 159 in 271142c
and this code assigns getter with for Function.prototype name property with null value.
name
null
Lines 160 to 165 in 271142c
Solution: skip defineProperty for null names
defineProperty
The text was updated successfully, but these errors were encountered:
ah, that's a really good catch - I don't think we ever expected anyone would refer to the name getter directly. Fix incoming.
Sorry, something went wrong.
003ee5d
Omg that was fast! Thank you!
No branches or pull requests
This code breaks
Function.prototype.name
in 100% of caseslaunchable code: https://codepen.io/ColCh/pen/Oqpqqp
Try it in IE 11 and this would be resulted in this:
WHY ?!
Because this code is executed against
this
variable ofFunction.prototype
es6-shim/es6-sham.js
Lines 158 to 159 in 271142c
and this code assigns getter with for
Function.prototype
name
property withnull
value.es6-shim/es6-sham.js
Lines 160 to 165 in 271142c
Solution: skip
defineProperty
fornull
namesThe text was updated successfully, but these errors were encountered: