piral-mithril
Version:
Plugin for integrating Mithril.js components in Piral.
18 lines • 470 B
JavaScript
import { m } from 'mithril';
export function createExtension(rootName) {
return {
oncreate(vnode) {
vnode.dom.dispatchEvent(new CustomEvent('render-html', {
bubbles: true,
detail: {
target: vnode.dom,
props: vnode.attrs,
},
}));
},
view() {
return m(rootName);
},
};
}
//# sourceMappingURL=extension.js.map