Skip to content
Snippets Groups Projects
Commit b986c49e authored by catch's avatar catch
Browse files

Issue #3239507 by hooroomoo, bnjmnm: Add CustomEvent polyfill to support IE11

parent 1ac9aaff
No related branches found
No related tags found
12 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1896Issue #2940605: Can only intentionally re-render an entity with references 20 times,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!872Draft: Issue #3221319: Race condition when creating menu links and editing content deletes menu links,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493,!512Issue #3207771: Menu UI node type form documentation points to non-existent function,!485Sets the autocomplete attribute for username/password input field on login form.,!449Issue #2784233: Allow multiple vocabularies in the taxonomy filter,!231Issue #2671162: summary text wysiwyg patch working fine on 9.2.0-dev,!30Issue #3182188: Updates composer usage to point at ./vendor/bin/composer
......@@ -186,6 +186,11 @@ drupal.collapse:
- core/drupal.form
- core/once
drupal.customevent:
version: VERSION
js:
misc/polyfills/customevent.js: { weight: -20 }
drupal.date:
version: VERSION
js:
......
......@@ -320,6 +320,7 @@ curle
curlopt
currenttime
currentuser
customevent
customly
customrequest
cweagans
......
/**
* @file
* Provides a polyfill for CustomEvent.
*
* This is needed for Internet Explorer 11.
*
* This has been copied from MDN Web Docs code samples. Code samples in the MDN
* Web Docs are licensed under CC0.
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill
* @see https://developer.mozilla.org/en-US/docs/MDN/About#Code_samples_and_snippets
*/
// eslint-disable-next-line func-names
(function () {
if (typeof window.CustomEvent === 'function') return false;
function CustomEvent(event, params) {
params = params || { bubbles: false, cancelable: false, detail: null };
const evt = document.createEvent('CustomEvent');
evt.initCustomEvent(
event,
params.bubbles,
params.cancelable,
params.detail,
);
return evt;
}
window.CustomEvent = CustomEvent;
})();
/**
* DO NOT EDIT THIS FILE.
* See the following change record for more information,
* https://www.drupal.org/node/2815083
* @preserve
**/
(function () {
if (typeof window.CustomEvent === 'function') return false;
function CustomEvent(event, params) {
params = params || {
bubbles: false,
cancelable: false,
detail: null
};
var evt = document.createEvent('CustomEvent');
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
return evt;
}
window.CustomEvent = CustomEvent;
})();
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment