snabbdom-safe-props

1.0.0 • Public • Published

snabbdom-safe-props

Snabbdom replacement for default module 'props' with unsupported 'type' protection. This simply adds a try/catch if the property being updated is type, as unsupported types will cause the browser to throw an exception.

Usage

Install:

npm i snabbdom-safe-props --save

Use:

var patch = snabbdom.init([
  require('snabbdom-safe-props') // Instead of require('snabbdom/modules/props')
]);

The props module

Allows you to set properties on DOM elements.

h('a', {props: {href: '/foo'}}, 'Go to Foo');

Readme

Keywords

Package Sidebar

Install

npm i snabbdom-safe-props

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • doesdev