Comments (8)
Thanks @ckknight for pointing that out, I did not knew about that bug. Still as bound
with in the bound function is only used for instanceof
it will work as expected since both functions will have same prototype. Also I guess it's probably better and safe to remove var bound =
entirely as it's not really necessary anyway. Also all other cases seem are fine as named functions are just saved as properties
from es5-shim.
The safest way is to either use the anonymous function expression or to use a proper function declaration. They're essentially equivalent (aside from the hoisting).
from es5-shim.
On Monday, 2011-03-28 at 09:25 , ckknight wrote:
The safest way is to either use the anonymous function expression or to use a proper function declaration. They're essentially equivalent (aside from the hoisting).
I believe my suggestion to remove
var bound =
would make a proper function declaration. Do you mean we need to do more then that ?Reply to this email directly or view it on GitHub:
https://github.com/kriskowal/es5-shim/issues/12#comment_926812
from es5-shim.
Nope, just go with either var bound = function() { }
or function bound() { }
.
from es5-shim.
Apparently I accidentally closed this. This is still an issue.
from es5-shim.
I don't see how this is actually a problem. If it was var boundA = function boundB() { ... }
, I could see an issue, but it's not broken the way it is. Still, I guess it's better to just change it.
from es5-shim.
It's minimally a memory leak in JScript (IE), since it creates two function instances rather than one.
from es5-shim.
Change above fixes this issue. closing!
from es5-shim.
Related Issues (20)
- All V8 versions have the Date shim loaded. HOT 1
- Rounding errors with toExponential in Edge 15/16 HOT 4
- IE9 error: Redeclaration of const property HOT 5
- Something in the shim causes Chrome to throw a warning HOT 3
- 4.5.11 got a tag, but not a full release HOT 2
- `hasAutomationEqualityBug` triggers deprecation warnings in Firefox
- Cannot convert undefined or null to object PropTypes.shape() HOT 9
- Question: Why concatenate Symbols with a string without assigning it to a variable? HOT 6
- Why not set bound.prototype = target.prototype directly? HOT 3
- in ie8 Object.keys failed this conversion HOT 3
- Action required: Greenkeeper could not be activated 🚨
- String#lastIndexOf has a shallow-wrapper shim that does nothing and always gets applied HOT 1
- Dependency Dashboard
- Conflict ES5-shim(sham) 4.5.15 and ES6-shim(sham) 0.35.x HOT 19
- Please change the name of the default branch HOT 1
- External URL linking to spam websites HOT 2
- errors with Object.defineProperty under ie8 since 4.6.3 HOT 6
- Incompatibility with awilix HOT 17
- Invalid Date on Safari HOT 2
- ⚠️ `webkitStorageInfo` is going away HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from es5-shim.