Issue #3190268 by mherchel, bnjmnm: Move/remove JavaScript polyfills
parent
5c3ac0a573
commit
f407fad818
|
@ -1,29 +0,0 @@
|
||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* From https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach#Polyfill
|
|
||||||
* Licensed public domain (CC0).
|
|
||||||
* @see https://creativecommons.org/publicdomain/zero/1.0/
|
|
||||||
* @see https://developer.mozilla.org/en-US/docs/MDN/About
|
|
||||||
*
|
|
||||||
* @todo Remove when https://www.drupal.org/node/3143465 is fixed.
|
|
||||||
*/
|
|
||||||
if (window.NodeList && !NodeList.prototype.forEach) {
|
|
||||||
NodeList.prototype.forEach = function (callback, thisArg) {
|
|
||||||
thisArg = thisArg || window;
|
|
||||||
for (var i = 0; i < this.length; i++) {
|
|
||||||
callback.call(thisArg, this[i], i, this);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* From https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Polyfill
|
|
||||||
* Licensed public domain (CC0).
|
|
||||||
* @see https://creativecommons.org/publicdomain/zero/1.0/
|
|
||||||
* @see https://developer.mozilla.org/en-US/docs/MDN/About
|
|
||||||
*/
|
|
||||||
if (!Element.prototype.matches) {
|
|
||||||
Element.prototype.matches =
|
|
||||||
Element.prototype.msMatchesSelector ||
|
|
||||||
Element.prototype.webkitMatchesSelector;
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
/**
|
|
||||||
* DO NOT EDIT THIS FILE.
|
|
||||||
* See the following change record for more information,
|
|
||||||
* https://www.drupal.org/node/2815083
|
|
||||||
* @preserve
|
|
||||||
**/
|
|
||||||
|
|
||||||
if (window.NodeList && !NodeList.prototype.forEach) {
|
|
||||||
NodeList.prototype.forEach = function (callback, thisArg) {
|
|
||||||
thisArg = thisArg || window;
|
|
||||||
|
|
||||||
for (var i = 0; i < this.length; i++) {
|
|
||||||
callback.call(thisArg, this[i], i, this);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Element.prototype.matches) {
|
|
||||||
Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
||||||
}
|
|
|
@ -57,11 +57,12 @@ global-styling:
|
||||||
|
|
||||||
js:
|
js:
|
||||||
js/checkbox.js: {}
|
js/checkbox.js: {}
|
||||||
js/polyfills.js: {}
|
|
||||||
js/scripts.js: {}
|
js/scripts.js: {}
|
||||||
js/navigation.js: {}
|
js/navigation.js: {}
|
||||||
js/second-level-navigation.js: {}
|
js/second-level-navigation.js: {}
|
||||||
dependencies:
|
dependencies:
|
||||||
|
- core/drupal.element.matches
|
||||||
|
- core/drupal.nodelist.foreach
|
||||||
- core/drupal
|
- core/drupal
|
||||||
|
|
||||||
book:
|
book:
|
||||||
|
|
Loading…
Reference in New Issue