JSPM

  • Created
  • Published
  • Downloads 13
  • Score
    100M100P100Q77392F
  • License ISC

lighterhtml plus `onconnected`, `ondisconnected`, and `onattributechanged` events

Package Exports

  • lighterhtml-plus

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (lighterhtml-plus) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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>
`);