W3C home > Mailing lists > Public > www-svg@w3.org > July 2009

Re: Canvas and Interactivity

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 24 Jul 2009 00:47:58 -0400
Message-ID: <4A693CFE.1060009@mit.edu>
To: Boris Zbarsky <bzbarsky@mit.edu>, Jonathan Watt <jwatt@jwatt.org>, "Robert O'Callahan" <robert@ocallahan.org>, Jeff Schiller <codedread@gmail.com>, anthony.grasso@cisra.canon.com.au, www-svg <www-svg@w3.org>
Cameron McCormack wrote:
> == checks for identity if both operands are objects, I thought (in
> addition to doing different kinds of comparisons if the operands are of
> different types):
> 
>   http://bclary.com/2004/11/07/#a-11.9.3 (step 13)

That's what the spec says, yes.  It doesn't quite match implementation 
reality in some edge cases which may or may not be triggerable by 
untrusted content script (and probably are not, at the moment).

For example, if you manage to get your hands on both the inner and outer 
window objects for a DOM Window in Gecko, they will most assuredly test 
== but not ===; then again, they're somewhat similar to the joined 
objects described in the specification.  There are various other cases 
too, especially cases where one object is supposed to be a wrapper for 
another object that enforces certain security constraints (the wrapper 
tests == but not === to the wrapped object).

In general, Spidermonkey allows host objects to implement == in an 
arbitrary way: see the |equality| member of JSExtendedClass at 
https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JSExtendedClass

-Boris
Received on Friday, 24 July 2009 04:54:18 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:42 GMT