Skip to content

Conversation

cyrilchapon
Copy link

Hello.

I made this because we needed support for sessionStorage option.

Changes :

  • Hub() constructor now accepts a single opts arguments
    • opts.permissions behaves like previously permissions
    • opts.storage is added. Can be one of window.localStorage and window.sessionStorage (or any object with the same API, I guess). It defaults to window.localStorage

Compat checks with window.localStorage are now made to opts.storage

TODO : Some tests should be added to ensure

  • Chosen storage is respected
  • Unprovided storage defaults to localStorage
  • Everything works like excepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant