HTML <script> nomodule Attribute
Example
<script src="demo.js" nomodule></script>
Meaning
The nomodule Boolean attribute is set to specifies that the script should not be executed in browsers that support ES2015 modules — in effect, this can be used to serve fallback scripts to older browsers that do not support modular JavaScript code.
This is a boolean attribute, the presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.
Standard Syntax
HTML: <script nomodule></script>
XHTML: <script nomodule="nomodule"></script>
Advertisement
Attribute Values
| Value | Description |
|---|---|
| nomodule | This is a boolean attribute, the presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value. |
Related pages:
See JavaScript Modules.