data-action
Bind all sorts of things to html click events to build your own UI framework.
Installation
npm install data-action
Usage
Define actions, along with 'before' and 'after' hooks. Each hook may return a promise, and if it does the promise will be waited on before the next handler is called. This means you could make an AJAX call to update something, and then refresh the current page:
var dataAction = ;var actions = ; actions;actions;actions;
Having set that up, you could use the following HTML to define a list of items that have delete buttons, with confirmation before hand, and refresh once the items have been deleted:
Item 10 Delete Item 20 Delete
License
MIT