Mercurial > hg > isophonics-drupal-site
annotate core/misc/drupal.init.es6.js @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 129ea1e6d783 |
children |
rev | line source |
---|---|
Chris@0 | 1 // Allow other JavaScript libraries to use $. |
Chris@0 | 2 if (window.jQuery) { |
Chris@0 | 3 jQuery.noConflict(); |
Chris@0 | 4 } |
Chris@0 | 5 |
Chris@0 | 6 // Class indicating that JS is enabled; used for styling purpose. |
Chris@0 | 7 document.documentElement.className += ' js'; |
Chris@0 | 8 |
Chris@0 | 9 // JavaScript should be made compatible with libraries other than jQuery by |
Chris@0 | 10 // wrapping it in an anonymous closure. |
Chris@0 | 11 |
Chris@17 | 12 (function(domready, Drupal, drupalSettings) { |
Chris@0 | 13 // Attach all behaviors. |
Chris@0 | 14 domready(() => { |
Chris@0 | 15 Drupal.attachBehaviors(document, drupalSettings); |
Chris@0 | 16 }); |
Chris@17 | 17 })(domready, Drupal, window.drupalSettings); |