Proposed change to typeof (was: Draft of Function.prototype.bind)

Tobie Langel tobie.langel at gmail.com
Tue Nov 4 15:28:38 PST 2008


On Nov 4, 2008, at 19:11 , Mark S. Miller wrote:
> I suggest that, for non-host objects, we change the ES3.1 spec so  
> that |typeof F === 'function'| iff the [[Class]] property of F is  
> "Function". For host objects, the spec would continue to allow them  
> to return whatever the func they want ;). This proposed change is  
> acceptable to all participants on this morning's ES3.1 call,  
> pending your reactions on these lists.

FWIW: That's what jQuery ended up using--after much tergiversation-- 
in jQuery.isFunction[1].

Best,

Tobie

[1] http://dev.jquery.com/browser/trunk/jquery/src/core.js#L621




More information about the Es-discuss mailing list