Skip to content

It's lighterhtml with `onconnected`, `ondisconnected`, and `onattributechanged` events

License

Notifications You must be signed in to change notification settings

WebReflection/lighterhtml-plus

Repository files navigation

lighterhtml-plus

Build Status WebReflection status License: ISC

This is exactly lighterhtml, plus:

  • onconnected callback, as in hyperHTML, to have Custom Elements like callbacks
  • ondisconnected callback, as in hyperHTML, to have counter events when nodes get disconnected
  • onattributechanged callback, as in wickedElements, to have attributes change notifications, Custom Elements like

Live test

V4 Breaking Changes

import {render, html} from 'lighterhtml-plus';

render(document.body, html`
  <div
    onconnected=${event => console.log('connected')}
    ondisconnected=${event => console.log('disconnected')}
    onattributechanged=${({
      attributeName,
      oldValue,
      newValue
    }) => console.log('changed')}
  >
    lighterhtml-plus 🎉
  </div>
`);

About

It's lighterhtml with `onconnected`, `ondisconnected`, and `onattributechanged` events

Resources

License

Stars

Watchers

Forks

Packages

No packages published