Re: [WebIDL] Exceptions

On Jul 7, 2011, at 10:09 AM, Aryeh Gregor wrote:

> On Wed, Jul 6, 2011 at 9:46 PM, Brendan Eich <brendan@mozilla.org> wrote:
>> Gecko is buggy if it is using the dynamic scope. Please file that bug and cc: me.
> 
> Gecko says the exception is an instanceof the DOMException object that
> corresponds to *any* window.  So e instanceof window1.DOMException and
> also e instanceof window2.DOMException.  IIRC, there's already a bug
> filed on this, but I can't find it.

Oh, I dimly recall this now. Earl adaptation to help developers confused by the cross-frame instanceof failure case? Not sure how early but I think it's pretty old.

If you use Object.getPrototypeOf in a loop (hand-expand instanceof), you can probably find out which window's DOMException.prototype is on the chain. That would be interesting.

/be

Received on Thursday, 7 July 2011 17:22:03 UTC