JavaScript detection with a class name on the body or html element tends to go unused even by websites that have it set up. Instead, we recommend that developers write progressively enhanced components that are styled for non-JS usage by default. Increase specificity, use the cascade, or code split to apply progressively enhanced styles.
16 lines
287 B
JavaScript
16 lines
287 B
JavaScript
import {domReady} from '@scripts/components';
|
|
|
|
/**
|
|
* Run the application when the DOM is ready.
|
|
*/
|
|
domReady(() => {
|
|
// Application code.
|
|
});
|
|
|
|
/**
|
|
* Accept module updates
|
|
*
|
|
* @see https://webpack.js.org/api/hot-module-replacement
|
|
*/
|
|
import.meta.webpackHot?.accept(console.error);
|