ES Modules
InDom is fully compatible with ES Modules environments.
You can import it directly in supported browsers or through any bundler that understands ESM syntax.Example (browser import):
<script type="module">
import { InDom, InDomArray, $1, $a, $id, $n, $v } from './dist/indom.esm.min.js';
InDom.onReady(() => {
$1('.example').setHtml('Hello from InDom!');
});
script>Example (bundler import):import { InDom, InDomArray, $1, $a, $id, $n, $v } from 'indom/dist/indom.esm.min.js';All module exports are named — import only what you need, or import the full library as InDom. Tree-shaking works naturally in all modern bundlers.
A source map ( dist/indom.esm.min.js.map) is included for debugging. Most editors and browsers pick it up automatically when using the minified build.
Next: Getting Started »