Skip to content

IE issue on 1.2.4 #17

@kamituel

Description

@kamituel

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;
  }
})();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions