Draft of Function.prototype.bind.
mjs at apple.com
Mon Nov 3 22:26:57 PST 2008
On Nov 3, 2008, at 8:51 PM, Mark S. Miller wrote:
> On FF3.0.3, a bit of testing reveals that RegExp instances are
> indeed callable as functions, which presumably means they have an
> internal [[Call]] property. And they are clearly native objects, not
> host objects. However, unlike Rhino or WebKit, of FF3.0.3 at least,
> typeof of a RegExp does return "object". I don't see any way to
> rationalize this as conforming to the spec. Since WebKit conforms to
> the ES3 spec in this regard, it would seem that one can both follow
> this clause of the spec and not break the web.
Beta 1 and I believe they have returned "function" from typeof that
whole time. (The Mozilla bug report says otherwise but I think that
testing must have been in error.) I'm not aware of any compatibility
issues due to either the callable extension or the way typeof is
reported as a result. I'm also not specifically aware of a
compatibility need for the callable regexp extension; it seems to be
something we inherited when we forked from KJS/KHTML many years ago.
More information about the Es-discuss