Loading core/misc/ajax.es6.js +0 −18 Original line number Diff line number Diff line Loading @@ -1532,10 +1532,6 @@ /** * Command to add css. * * Uses the proprietary addImport method if available as browsers which * support that method ignore @import statements in dynamically added * stylesheets. * * @param {Drupal.Ajax} [ajax] * {@link Drupal.Ajax} object created by {@link Drupal.ajax}. * @param {object} response Loading @@ -1546,21 +1542,7 @@ * The XMLHttpRequest status. */ add_css(ajax, response, status) { // Add the styles in the normal way. $('head').prepend(response.data); // Add imports in the styles using the addImport method if available. let match; const importMatch = /^@import url\("(.*)"\);$/gim; if ( document.styleSheets[0].addImport && importMatch.test(response.data) ) { importMatch.lastIndex = 0; do { match = importMatch.exec(response.data); document.styleSheets[0].addImport(match[1]); } while (match); } }, /** Loading core/misc/ajax.js +0 −10 Original line number Diff line number Diff line Loading @@ -629,16 +629,6 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr }, add_css: function add_css(ajax, response, status) { $('head').prepend(response.data); var match = void 0; var importMatch = /^@import url\("(.*)"\);$/gim; if (document.styleSheets[0].addImport && importMatch.test(response.data)) { importMatch.lastIndex = 0; do { match = importMatch.exec(response.data); document.styleSheets[0].addImport(match[1]); } while (match); } }, message: function message(ajax, response) { var messages = new Drupal.Message(document.querySelector(response.messageWrapperQuerySelector)); Loading Loading
core/misc/ajax.es6.js +0 −18 Original line number Diff line number Diff line Loading @@ -1532,10 +1532,6 @@ /** * Command to add css. * * Uses the proprietary addImport method if available as browsers which * support that method ignore @import statements in dynamically added * stylesheets. * * @param {Drupal.Ajax} [ajax] * {@link Drupal.Ajax} object created by {@link Drupal.ajax}. * @param {object} response Loading @@ -1546,21 +1542,7 @@ * The XMLHttpRequest status. */ add_css(ajax, response, status) { // Add the styles in the normal way. $('head').prepend(response.data); // Add imports in the styles using the addImport method if available. let match; const importMatch = /^@import url\("(.*)"\);$/gim; if ( document.styleSheets[0].addImport && importMatch.test(response.data) ) { importMatch.lastIndex = 0; do { match = importMatch.exec(response.data); document.styleSheets[0].addImport(match[1]); } while (match); } }, /** Loading
core/misc/ajax.js +0 −10 Original line number Diff line number Diff line Loading @@ -629,16 +629,6 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr }, add_css: function add_css(ajax, response, status) { $('head').prepend(response.data); var match = void 0; var importMatch = /^@import url\("(.*)"\);$/gim; if (document.styleSheets[0].addImport && importMatch.test(response.data)) { importMatch.lastIndex = 0; do { match = importMatch.exec(response.data); document.styleSheets[0].addImport(match[1]); } while (match); } }, message: function message(ajax, response) { var messages = new Drupal.Message(document.querySelector(response.messageWrapperQuerySelector)); Loading