2

There was an answer for a question about Firebase here: https://stackoverflow.com/a/42137694/9903

initially the code was on codepen: http://codepen.io/elrumordelaluz/pen/9de723acbe5c2191db95fd26cdba0c24?editors=0011

and I moved it into a stacksnippet, however it always displays "Script Error" in the console on the line <script src="https://www.gstatic.com/firebasejs/3.6.9/firebase.js"></script>

I'm not sure what the issue is and why it works in the codepen but not in a stack snippet.

3
  • In the dev console it says: Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "null" from accessing a cross-origin frame. which originates from the firebase.js
    – rene
    Commented Feb 15, 2017 at 14:44
  • @rene is there some way to get around that?
    – user9903
    Commented Feb 15, 2017 at 14:46
  • I'm not a javascript dev that deals with same-origin settings and sand-boxes. But it looks like firebase.js want to grab something that it is not allowed to by the IFrame it is hosted in by the Stack Snippet and I'm pretty sure that restriction is there to protect scripts from doing nasty things. If firebase doesn't have a config setting to tell it to not do that I doubt there is solution for that, except keeping the working demo on codpen.
    – rene
    Commented Feb 15, 2017 at 14:50

0

You must log in to answer this question.