diff --git a/core/core.libraries.yml b/core/core.libraries.yml
index fb13d9c..dcd3abe 100644
--- a/core/core.libraries.yml
+++ b/core/core.libraries.yml
@@ -33,8 +33,7 @@ drupal:
   version: VERSION
   js:
     misc/drupal.js: { weight: -18 }
-  dependencies:
-    - core/domready
+    misc/init.js: { scope: drupal_initialization }
 
 drupalSettings:
   version: VERSION
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index b62ad74..6700e36 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -2078,6 +2078,10 @@ function template_preprocess_html(&$variables) {
   $footer_scripts = new RenderWrapper('drupal_get_js', array('footer'));
   $variables['page_bottom'][] = array('#markup' => $footer_scripts);
 
+  // Add initialization of scripts
+  $bottom_scripts = new RenderWrapper('drupal_get_js', array('drupal_initialization'));
+  $variables['page_bottom'][] = array('#markup' => $bottom_scripts);
+
   // Wrap function calls in an object so they can be called when printed.
   $variables['head'] = new RenderWrapper('drupal_get_html_head');
   $variables['styles'] = new RenderWrapper('drupal_get_css');
diff --git a/core/misc/drupal.js b/core/misc/drupal.js
index 458d385..6782153 100644
--- a/core/misc/drupal.js
+++ b/core/misc/drupal.js
@@ -13,7 +13,7 @@ if (window.jQuery) {
 
 // JavaScript should be made compatible with libraries other than jQuery by
 // wrapping it in an anonymous closure.
-(function (domready, Drupal, drupalSettings) {
+(function (Drupal, drupalSettings) {
 
   "use strict";
 
@@ -99,9 +99,6 @@ if (window.jQuery) {
     }
   };
 
-  // Attach all behaviors.
-  domready(function () { Drupal.attachBehaviors(document, drupalSettings); });
-
   /**
    * Detach registered behaviors from a page element.
    *
@@ -427,4 +424,4 @@ if (window.jQuery) {
     return '<em class="placeholder">' + Drupal.checkPlain(str) + '</em>';
   };
 
-})(domready, Drupal, window.drupalSettings);
+})(Drupal, window.drupalSettings);
diff --git a/core/misc/init.js b/core/misc/init.js
new file mode 100644
index 0000000..7b0a520
--- /dev/null
+++ b/core/misc/init.js
@@ -0,0 +1,2 @@
+// Attach all behaviors.
+Drupal.attachBehaviors(document, window.drupalSettings);
\ No newline at end of file
