Re: [heycam/webidl] Is a subclass still a platform object? (#540)

And for extra excitement, here's another interesting testcase:

    <iframe></iframe>
    <script>
    var X = new frames[0].Proxy(Image, {})
    obj = new X();
    w(obj.ownerDocument == document);
    w(obj.ownerDocument == frames[0].document);
    </script>

live at <http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=5859>.  Here Chrome logs `false`, then `true`.  Everyone else logs `true` then `false`.  This doesn't involve subclassing, but shows the same behavior difference.  Basically, Chrome is using the Realm of new.target, not the Realm of the actual constructor, to create objects.  Per that language that's mysteriously disappeared from the IDL spec, that's a Chrome bug.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/540#issuecomment-379011793

Received on Thursday, 5 April 2018 17:22:01 UTC