22 lines
460 B
JavaScript
22 lines
460 B
JavaScript
const render = $ => {
|
|
$('#purehtml-container').html('Hello, render with jQuery');
|
|
return Promise.resolve();
|
|
};
|
|
|
|
(global => {
|
|
global['purehtml'] = {
|
|
bootstrap: () => {
|
|
console.log('purehtml bootstrap');
|
|
return Promise.resolve();
|
|
},
|
|
mount: () => {
|
|
console.log('purehtml mount');
|
|
return render($);
|
|
},
|
|
unmount: () => {
|
|
console.log('purehtml unmount');
|
|
return Promise.resolve();
|
|
},
|
|
};
|
|
})(window);
|