ES5 {}.toString breaks JQuery

Brendan Eich brendan at
Mon Jun 28 14:02:18 PDT 2010

On Jun 28, 2010, at 1:52 PM, Brendan Eich wrote:

> Often the way forward is to find sane intersection semantics and spec them. We're trying this for function-in-block.
> [...]

> The problem with the Mark approach is twofold: (1) measuring risk (= probability x cost) is hard; (2) even if you measure risk well, you then have to trade risk-apples for cleanliness-oranges.

To take the Mark side for a minute, we know browsers in the field do not agree on Object.prototype.toString(null), i.e., whether the global object calls its class "DOMWindow", "Window", or something else.

Similar to function-in-block, which behaves differently in extant browsers.

So we could reason that no one counts on cross-browser semantics in detail, just on the lack of a TypeError. This might tip one's judgment in favor of Mark's proposal.

But you'd still need lots of new-browser-version beta testing to begin to have confidence.


More information about the es5-discuss mailing list