be-exporting
v0.0.4
Published
Export JS constants from inline script attributes.
Downloads
23
Maintainers
Readme
be-exporting
Export JS constants from inline script attributes.
<div be-exporting='of onload.' onload="export const test='hello';"></div>
To access the export const symbols:
const enhancement = await oDiv.beEnhanced.whenResolved('be-exporting');
const {onload} = enhancement;
const {test} = onload;
Viewing Demos Locally
Any web server that can serve static files will do, but...
- Install git.
- Fork/clone this repo.
- Install node.js.
- Open command window to folder where you cloned this repo.
npm install
npm run serve
- Open http://localhost:3030/demo/ in a modern browser.
Running Tests
> npm run test
Using from ESM Module:
import 'be-exporting/be-exporting.js';