Created
October 17, 2016 13:37
-
-
Save AVGP/1914371468c1537738566ae288fb59aa to your computer and use it in GitHub Desktop.
Demonstrates the issue with switching between different WebVR content within the same page
This file contains 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> | |
<body> | |
<button id="first">First Demo</button> | |
<button id="second">Second Demo</button> | |
<iframe width="500" height="500" src="03-vr-presentation.html" allowvr></iframe> | |
<script> | |
var iframe = document.querySelector('iframe') | |
document.getElementById('first').addEventListener('click', function() { | |
iframe.contentWindow.location.href = '03-vr-presentation.html' | |
}) | |
document.getElementById('second').addEventListener('click', function() { | |
iframe.contentWindow.location.href = 'XX-360-panorama.html' | |
}) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment