Created
August 8, 2017 23:29
-
-
Save Pyrolistical/d07ece34a9956398b2ca75e9e4c985a0 to your computer and use it in GitHub Desktop.
Repo case for firebase iframe sandbox issue
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<title>I r child</title> | |
<style> | |
body { | |
margin: 0; | |
padding: 0; | |
} | |
* { | |
box-sizing: border-box; | |
} | |
</style> | |
</head> | |
<body> | |
<p>Hi</p> | |
<div id="content"></div> | |
<script src="https://www.gstatic.com/firebasejs/4.2.0/firebase.js"></script> | |
<script> | |
var config = { | |
YOUR CONFIG | |
}; | |
// this is workaround | |
// firebase.database.INTERNAL.forceWebSockets() | |
firebase.initializeApp(config); | |
firebase.database().ref('some-ref').once('value', function(dataSnapshot) { | |
console.log(dataSnapshot.val()) | |
}) | |
</script> | |
</body> | |
</html> |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<title>I haz iframe</title> | |
<style> | |
body { | |
margin: 0; | |
padding: 0; | |
} | |
* { | |
box-sizing: border-box; | |
} | |
</style> | |
</head> | |
<body> | |
<iframe id="viewer-overlay" src="http://localhost:8080/child.html" style="height: 720px; width: 1280px;" sandbox="allow-forms allow-scripts"></iframe> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment