reverted: --- b/core/core.libraries.yml +++ a/core/core.libraries.yml @@ -48,15 +48,9 @@ misc/drupal.js: { weight: -18 } misc/drupal.init.js: { weight: -17 } dependencies: - - core/drupal-init - core/domready - core/drupalSettings -drupal-init: - version: VERSION - js: - misc/drupal-init.js: { weight: -19 } - drupalSettings: version: VERSION js: reverted: --- b/core/misc/drupal-init.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @file - * - * Base framework for Drupal-specific JavaScript, behaviors. - */ -(function (window) { - - "use strict"; - - window.Drupal = { behaviors: {}, locale: {} }; - - // Allows users to turn off animations. - var noAnimate = localStorage.getItem('Drupal.noAnimate') === 'true'; - // Class indicating that JS is enabled; used for styling purpose. - document.documentElement.className += ' js' + (noAnimate ? ' no-animate' : ''); - - // Allow other JavaScript libraries to use $. - if (window.jQuery) { - jQuery.noConflict(); - jQuery.fx.off = noAnimate; - } - -})(window); only in patch2: unchanged: --- a/core/misc/drupal.init.es6.js +++ b/core/misc/drupal.init.es6.js @@ -1,11 +1,18 @@ +// Allows users to turn off animations. +const noAnimate = localStorage.getItem('Drupal.noAnimate') === 'true'; + +// Class indicating that JS is enabled; used for styling purpose. +document.documentElement.className += ' js'; + +// Class indicating that no animations should be triggered. +document.documentElement.className += `${noAnimate ? ' no-animate' : ''}`; + // Allow other JavaScript libraries to use $. if (window.jQuery) { jQuery.noConflict(); + jQuery.fx.off = noAnimate; } -// Class indicating that JS is enabled; used for styling purpose. -document.documentElement.className += ' js'; - // JavaScript should be made compatible with libraries other than jQuery by // wrapping it in an anonymous closure. only in patch2: unchanged: --- a/core/misc/drupal.init.js +++ b/core/misc/drupal.init.js @@ -5,12 +5,17 @@ * @preserve **/ +var noAnimate = localStorage.getItem('Drupal.noAnimate') === 'true'; + +document.documentElement.className += ' js'; + +document.documentElement.className += '' + (noAnimate ? ' no-animate' : ''); + if (window.jQuery) { jQuery.noConflict(); + jQuery.fx.off = noAnimate; } -document.documentElement.className += ' js'; - (function (domready, Drupal, drupalSettings) { 'use strict';