- From: Anne van Kesteren <annevk@annevk.nl>
- Date: Fri, 14 Nov 2014 12:39:23 +0100
- To: Domenic Denicola <d@domenic.me>
- Cc: Boris Zbarsky <bzbarsky@mit.edu>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Fri, Nov 14, 2014 at 12:31 PM, Domenic Denicola <d@domenic.me> wrote:
> Just to sharpen the discussion, it would help to give one example of each...
<!DOCTYPE html>
<iframe></iframe>
<script>
function isObjectFromGlobal(object, global) { return object
instanceof global.Object }
onload = function() {
var x = new self[0].Array()
w(isObjectFromGlobal(x, self[0]))
x = Array.prototype.constructor.call(self[0])
w(isObjectFromGlobal(x, self[0]))
x = self[0].document.createElement("x")
w(isObjectFromGlobal(x, self[0]))
x = Document.prototype.createElement.call(self[0].document, "x")
w(isObjectFromGlobal(x, self[0]))
}
</script>
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/3302
yields true, false, true, true.
--
https://annevankesteren.nl/
Received on Friday, 14 November 2014 11:39:50 UTC