Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE issue on 1.2.4 #17

Open
kamituel opened this issue Apr 13, 2017 · 0 comments
Open

IE issue on 1.2.4 #17

kamituel opened this issue Apr 13, 2017 · 0 comments

Comments

@kamituel
Copy link

It seems IE 10, 11 and Edge all have issue with the way StorageEvent is being used - as a constructor.

This breaks session storage in those browsers. The only way to get it to work is to polyfill StorageEvent to act as a function (constructor), with something like:

(function () {
  try {
    new window.StorageEvent("storage");
  } catch (e) {
    console.log('Using a polyfill for StorageEvent.');

    function StorageEvent (event, params) {
      var evt = document.createEvent('StorageEvent');
      return evt;
     }

    StorageEvent.prototype = window.StorageEvent.prototype;
    window.StorageEvent = StorageEvent;
  }
})();
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

No branches or pull requests

2 participants
@kamituel and others