ESCode implements the ES Components specification to allow you to define special properties on a hierarchy of reactive DOM objects.
The escode
package contains the functionality necessary to define [ES Components].
Relatedly, the core is a lightweight package that contains the core functionality of ESCode without DOM features.
import { create } from 'escode';
const button = {
__element: 'button',
__attributes: {
onclick: function (input) { console.log(this) }
}
}
const component = create(button, {__parent: document.body})
component.__element.click()
See https://github.com/brainsatplay/escode
Brains@Play is managed by Garrett Flynn and Joshua Brewster, who use contract work and community contributions through Open Collective to support themselves.
Support us with a monthly donation and help us continue our activities!
Become a sponsor and get your logo here with a link to your site!