4 ms·
Would you clarify?
by kansface 14y ago
Would you clarify?
- jpolitz 14y agoMy comment was wrong, I was mis-remembering a bug that I'd seen before. You can get everything correct with the prototypes, but you cannot perfectly emulate it. The only thing you can't do with JS emulation of .bind() is the ability to create a varargs constructor (https://bugs.webkit.org/show_bug.cgi?id=26382#c29 https://bugs.webkit.org/show_bug.cgi?id=26382#c29). But at the same time, I don't totally grok that example yet. The relevant bit of the spec is http://es5.github.com/#x15.3.4.5.2 http://es5.github.com/#x15.3.4.5.2, which describes the [[Construct]] behavior of .bind().