Files
nebula.js/examples/mashup/index.js
Miralem Drek 6a28ec3dd4 refactor: expose nucleus and supernova via stardust package (#415)
BREAKING CHANGE: nucleus and supernova are no longer public packages and are both replaced by stardust
2020-04-28 13:02:41 +02:00

26 lines
517 B
JavaScript

/* eslint-disable */
const { useElement } = stardust;
connect().then((app) => {
const sn = {
component() {
useElement().innerHTML = 'Hello';
},
};
const nebbie = stardust.embed(app, {
load: (type, config) => Promise.resolve(sn),
});
nebbie.selections().then((s) => s.mount(document.querySelector('.toolbar')));
document.querySelectorAll('.object').forEach((el) => {
const type = el.getAttribute('data-type');
nebbie.render({
type,
element: el,
});
});
});