Can DOM methods be native Function objects?
cam at mcc.id.au
Sun Oct 10 15:37:54 PDT 2010
> > Which one of the following is true?
> > * these functions are indeed representable with a FunctionBody
> > somehow, and thus don’t need a custom [[Call]];
> > * a custom [[Call]] is needed, but native objects are allowed to have
> > a custom [[Call]]; or
> > * a custom [[Call]] is needed and thus the objects are host objects,
> > but these browsers I tested don’t follow the spec in using a
> > [[Class]] value different from those used in the spec.
> Not the last, reality trumps spec fantasy, especially over 15 years.
> Native functions do not have associated FunctionBody representations,
> of course; one clue is what toString returns.
> So what is wrong with door #2?
Nothing, particularly. It would benefit from a clarification in the
spec as to exactly what constitutes a native/host object, though.
Cameron McCormack ≝ http://mcc.id.au/
More information about the es5-discuss