A cross domain storage solution with an API to store data through iframe. Use local storage on all the browsers except Safari. Use cookies on Safari because of the default option of 'From third parties and advertisers.'
First of all, create a channel with a url to save data.
CrossDomainStorage
.newChannel('storage', 'http://localhost:8001/storage.html')
.save('sampleKey', 'sampleData');
For the url you specify above, create a channel to receive the data.
CrossDomainStorage
.newChannle('parent');
Create a channel with a name.
If a url is passed, it creates a channel connecting to the url you specify through iframe.
If a url is not passed, it creates a channel that connecting to the parent window.
Return the channel that a name matches.
Return a promise that returns the value of a key.
Return a promise that returns all the data stored by CrossDomainStorage.
Set a value to a key and return a promise after it finishes setting.
Delete data that a key matches and return a promise after it finishes deleting.