Created
February 11, 2014 04:30
-
-
Save zhiyelee/8929280 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="instanceof cross iframe" /> | |
<meta charset="utf-8"> | |
<title>instanceof cross iframe</title> | |
</head> | |
<body> | |
<iframe id="fr" ></iframe> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fr = document.getElementById('fr'); | |
var arr = []; | |
var ArrayFr = fr.contentWindow.Array; | |
var arr2 = new ArrayFr(); | |
console.log(Object.prototype.toString.call(arr)); | |
console.log(Object.prototype.toString.call(arr2)); | |
console.log(arr instanceof Array); | |
console.log(arr instanceof ArrayFr); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment