This was added in a previous master-only issue and breaks backwards compatability with child themes.
There is no need to have the init function here.
});
};
-/**
- * Bootstrap init function
- */
-const init = () => {
- const pendingPromise = new Pending('theme_boost/loader:init');
+const pendingPromise = new Pending('theme_boost/loader:init');
- setupBootstrapPendingChecks();
+// Add pending promise event listeners to relevant Bootstrap custom events.
+setupBootstrapPendingChecks();
- // Remember the last visited tabs.
- rememberTabs();
+// Remember the last visited tabs.
+rememberTabs();
- // Enable all popovers.
- enablePopovers();
+// Enable all popovers.
+enablePopovers();
- // Enable all tooltips.
- enableTooltips();
+// Enable all tooltips.
+enableTooltips();
- // Add scroll handling.
- (new Scroll()).init();
+// Add scroll handling.
+(new Scroll()).init();
- // Disables flipping the dropdowns up and getting hidden behind the navbar.
- $.fn.dropdown.Constructor.Default.flip = false;
+// Disables flipping the dropdowns up and getting hidden behind the navbar.
+$.fn.dropdown.Constructor.Default.flip = false;
- // Setup Aria helpers for Bootstrap features.
- Aria.init();
+// Setup Aria helpers for Bootstrap features.
+Aria.init();
- pendingPromise.resolve();
-};
+pendingPromise.resolve();
-/**
- * Set up the search.
- *
- * @method init
- */
export {
- init,
- Bootstrap
+ Bootstrap,
};
</body>
</html>
M.util.js_pending('theme_boost/loader');
-require(['theme_boost/loader'], function(loader) {
- loader.init();
+require(['theme_boost/loader'], function() {
M.util.js_complete('theme_boost/loader');
});
</html>
{{#js}}
M.util.js_pending('theme_boost/loader');
-require(['theme_boost/loader'], function(loader) {
- loader.init();
+require(['theme_boost/loader'], function() {
M.util.js_complete('theme_boost/loader');
});
</body>
</html>
M.util.js_pending('theme_boost/loader');
-require(['theme_boost/loader'], function(loader) {
- loader.init();
+require(['theme_boost/loader'], function() {
M.util.js_complete('theme_boost/loader');
});
</html>
{{#js}}
M.util.js_pending('theme_boost/loader');
-require(['theme_boost/loader'], function(loader) {
- loader.init();
+require(['theme_boost/loader'], function() {
M.util.js_complete('theme_boost/loader');
});
{{/js}}
</html>
{{#js}}
M.util.js_pending('theme_boost/loader');
-require(['theme_boost/loader'], function(loader) {
- loader.init();
+require(['theme_boost/loader'], function() {
M.util.js_complete('theme_boost/loader');
});
{{/js}}
</html>
{{#js}}
M.util.js_pending('theme_boost/loader');
-require(['theme_boost/loader'], function(loader) {
- loader.init();
+require(['theme_boost/loader'], function() {
M.util.js_complete('theme_boost/loader');
});
{{/js}}