Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bondo

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bondo

a nano framework for web components

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

Bondo

This is just a little glue between Custom Elements and Virtual-DOM.

Usage

const bondo = require('bondo');
const h = bondo.h;

register({
  render() {
    h('hello-component', [
      h('h1', 'Hello ' + this.getAttribute('you') || 'World'),
      h('input', {
        onkeyup: ev => this.setAttribute('you', ev.target.value)
      })
    ])
  }
});

Then use it like you would any other HTML element.

<hello-component you="Jesse"></hello-component>

Whenever the element's attributes change the render function gets called again and the element's DOM gets patched with changes.

It's simple, it works, there're tests! Is it useful for building applications? I don't know, you tell me!

Todo

  • Provide hooks into the CustomElement lifecycle events
  • [] Test if nesting works
  • [] Create a TodoMVC app
  • [] Think of a way to prerender on the server
  • [] Try to pass in complex values
  • Maybe do something with the existing children instead of throwing them away
  • [] Get a better name, vdom-elements, Ponents, Ponies, maybe see if substack will give me "Pony"

Credits

License

Artistic License 2.0, see LICENSE.md for details.

NPM

Keywords

FAQs

Package last updated on 13 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc