Should host objects be able to have [[Class]] "Function", "Array" etc.?

Garrett Smith dhtmlkitchen at
Fri Nov 14 22:47:26 PST 2008

2008/11/14 Maciej Stachowiak <mjs at>:
> On Nov 14, 2008, at 8:30 PM, Mark S. Miller wrote:
> On Fri, Nov 14, 2008 at 8:25 PM, Maciej Stachowiak <mjs at> wrote:
>> [...]
>>  WebKit has a host class that is identical to the native String class in
>> every way, except that it compares equal to null and undefined, vended in
>> rare circumstances.[...]
> == or ===?
> Both.

It seems that is a false statement. We can test the filter example by
comparing it to null using == and === in Webkit:-

javascript:alert('' ==
javascript:alert(null ==
both true

javascript:alert(null ===
javascript:alert('' ===
both false.

> Could you say more about this, or point at any existing docs?
> Specifically, we expose a "filter" property on CSSStyleDeclaration, in
> support of the SVG filter CSS property. However, many sites test for
> "filter" to detect support for MSIE's proprietary "filter" property, which
> sadly has the same name but completely incompatible syntax. Thus, we return
> this kind of magical undetectable string so if tests don't detect us as IE.
> It works basically the same ways as Mozilla's undetectable document.all,
> which we also support.

I have doubts that having an empty string would protect scripts. It
would seem to cause more harm than good. Where are the scripts that
you prevented from breaking?


More information about the Es-discuss mailing list