The dblazy.js file only checks for the existence of the window.CustomEvent. This leads to "Object doesn't support this action" errors in IE 9, 10 & 11 since the window.CustomEvent exists but is an Object, not a function / prototype.

Ref: https://stackoverflow.com/questions/26596123/internet-explorer-9-10-11-e...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

recrit created an issue. See original summary.

recrit’s picture

The attached patch corrects the polyfill to:

    if (typeof window.CustomEvent === "function") {
      event = new CustomEvent(eventName, data);
    }
    else {
      event = document.createEvent('CustomEvent');
      event.initCustomEvent(eventName, true, true, data);
    }
gausarts’s picture

Thank you!
I didn't notice this when working with IE9 + 11 last time. But glad you did. I might overlook.

  • gausarts committed 6e98ba0 on 8.x-2.x authored by recrit
    Issue #3075938 by recrit: dBlazy library uses incorrect polyfill for...
gausarts’s picture

Status: Needs review » Fixed

Committed with minor change from double to single quote ('function') to match the rest. Thank you for contribution!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.