summaryrefslogtreecommitdiffstatshomepage
path: root/core/misc/drupalSettingsLoader.es6.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/misc/drupalSettingsLoader.es6.js')
-rw-r--r--core/misc/drupalSettingsLoader.es6.js24
1 files changed, 0 insertions, 24 deletions
diff --git a/core/misc/drupalSettingsLoader.es6.js b/core/misc/drupalSettingsLoader.es6.js
deleted file mode 100644
index 6cc4be9f41e..00000000000
--- a/core/misc/drupalSettingsLoader.es6.js
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * @file
- * Parse inline JSON and initialize the drupalSettings global object.
- */
-
-(function () {
- // Use direct child elements to harden against XSS exploits when CSP is on.
- const settingsElement = document.querySelector(
- 'head > script[type="application/json"][data-drupal-selector="drupal-settings-json"], body > script[type="application/json"][data-drupal-selector="drupal-settings-json"]',
- );
-
- /**
- * Variable generated by Drupal with all the configuration created from PHP.
- *
- * @global
- *
- * @type {object}
- */
- window.drupalSettings = {};
-
- if (settingsElement !== null) {
- window.drupalSettings = JSON.parse(settingsElement.textContent);
- }
-})();