0.0.2 • Published 7 months ago
be-invoking v0.0.2
be-invoking
Invoke method on upstream peer element or the host.
Example 1a
<my-custom-element>
#shadow
<input disabled be-invoking='of do something.'>
</my-custom-element>
What this does: Invokes host-element's doSomething method only when the input element dispatches "input" event.
To specify a different event:
Example 1b
<host-element>
#shadow
<input be-invoking='of do something on change.'>
</host-element>
Example 2
<host-element>
#shadow
<peer-element -my-method></peer-element>
<input be-invoking='of -my-method.'>
</host-element>
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-invoking/be-invoking.js';
Using from CDN:
<script type=module crossorigin=anonymous>
import 'https://esm.run/be-invoking';
</script>