Created
June 15, 2013 00:49
-
-
Save ibdknox/5786292 to your computer and use it in GitHub Desktop.
make node-webkit crash with devtools + webgl
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
<html> | |
<head> | |
<meta charset='utf-8'> | |
<title> | |
WebGL | |
</title> | |
<style> | |
body { background: #202020; color:#ccc; } | |
a { color:#ccc; } | |
iframe {border:none;} | |
</style> | |
</head> | |
<body> | |
<a href="#" id="move">move iframe</a> | |
<div id="parent"> | |
<iframe src="http://threejs.org/examples/webgl_buffergeometry.html" width="50%" height="50%" nwfaketop="true" nwdisable="true"></iframe> | |
</div> | |
<div id="newparent"> | |
</div> | |
<script type="text/javascript"> | |
require("nw.gui").Window.get().showDevTools(); | |
var iframe = document.querySelector("iframe"); | |
var button = document.querySelector("#move"); | |
console.log(button); | |
button.addEventListener("click", function(e) { | |
document.querySelector("#newparent").appendChild(iframe); | |
e.preventDefault(); | |
return false; | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment