Is there an option for 'http' protocol communication with 'file' protocol?

70 views
Skip to first unread message

Greg Howdeshell

unread,
Mar 4, 2016, 7:50:31 PM3/4/16
to easyxdm
Is there a way easyXDM can communicate between iframed content and a static html page stored on a local drive?  I'm running into CORS concerns with an error message noting: "Uncaught SecurityError: Blocked a frame with origin "http://localhost:3000" from accessing a frame with origin "null".  The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "file". Protocols must match."  I'm reviewing easyXDM as a solution but before I dig into it too much wanted to throw out my roadblock.  Thoughts or alternative solutions?

Øyvind Sean Kinsey

unread,
Mar 4, 2016, 7:52:59 PM3/4/16
to easyxdm
Hi Greg, this is not possible since file comes with a non-defined security model, which makes it close to impossible to write any deterministic code.

You should be able to use regular postMessage between the two iframes though.

Greg Howdeshell

unread,
Mar 7, 2016, 10:41:00 AM3/7/16
to easyxdm
Hmm, really a pain to solve this issue.  In an attempt to perform a generic post message, the post still requires a valid host name.  So that didn't seem to work either.  
Reply all
Reply to author
Forward
0 new messages