Coder Social home page Coder Social logo

Comments (2)

Laucsen avatar Laucsen commented on July 21, 2024

Hi,

Copying some partes of your code I found the way to make it works.
It seems that ins some place, magic iFrame must set: document.domain to sane domain as main page.

Lige: google.com on both, the local storage is accessible.

from cross-domain-local-storage.

ofirdagan avatar ofirdagan commented on July 21, 2024

Hi Laucsen.

I think I wasn't clear in the readme file.

In order for this to work u must have only one instance of the "magical iframe". That is the link between all of your clients.

So when u call xdLocalStorage.init
u need to make sure that the iFrameUrl is the same for all of your clients.

for example in my demo I've created this file
https://rawgit.com/ofirdagan/cross-domain-local-storage/master/app/views/cross-domain-local-storage.html

And I init both of my clients with this iFrameUrl

Client 1 (on rawgit.com) : https://rawgit.com/ofirdagan/cross-domain-local-storage/master/app/index.html

Client 2 (on wix.com) : http://ofird120dsfsds.wix.com/cross-domain-ls

I'll update the readme so it'll be more clear.

I hope I helped you, if not feel free to write back.

from cross-domain-local-storage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.