pass-message
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

pass-message

pass-message (or p-m for short) is a web component that can attach a listener to a neighboring DOM element, and invoke methods on its containing host web component, or other DOM elements up the DOM tree, when the event fires.

pass-message is one of a number of web components that comprise the [https://github.com/bahrus/p-et-alia] framework of web components.

Example Syntax

<button disabled part=expander class="expander nonPrimitive" -text-content></button>
<p-m on=click to-host prop=toggleOpen val=target.textContent></p-m>

"prop" is the name of the method or arrow function property attached to the Custom Element container.

Package Sidebar

Install

npm i pass-message

Weekly Downloads

0

Version

0.0.5

License

MIT

Unpacked Size

10.8 kB

Total Files

9

Last publish

Collaborators

  • bahrus