Shinobu does not purify html by default, in most cases this can be unsafe.
but theres an option to make a function that can be used to purify html.
shinobu.purifyHTML = (HTML) => {
...
return pureHTML;
};
Shinobu is for single page apps.
Fast, simple and vanilla javascript π¦ web framework for weebs.
https://shinobu.js.org/v0.0.1/script.js
<script src='https://shinobu.js.org/v0.0.1/script.js'></script>
ShinobuApp({
o,
lazy,
html,
dynamicHtml,
props,
dynamicProps,
funcs,
});
ShinobuApp({
o: '..',
lazy: '..',
html: `
..
`,
dynamicHtml: (props, dynamicProps) => {
return '..';
},
props: {
a: 0,
},
dynamicProps: () => {
return {};
},
funcs: {
onload: () => console.log('app load success >w<'),
},
});
<html id='donut'>
...
</html>
Takes in donut
π©.
ShinobuApp({
o: o('#app'),
...
});
Takes in html that pops up and waits for dynamicProps
.
ShinobuApp({
...
lazy: '< loading />',
...
});
Takes in app
html.
ShinobuApp({
...
html: '< app />',
...
});
Takes in a function that returns app
html.
ShinobuApp({
...
dynamicHtml: async (props, dynamicProps) => {
return '< app />';
},
...
});
Takes in data/props
ShinobuApp({
...
props: {
id: 2,
},
...
});
Takes in a function that returns props.
ShinobuApp({
...
dynamicProps: async () => {
return {id: 2};
},
...
});
Takes in functions funcs.onload
.
ShinobuApp({
...
html: `
< onclick=funcs.onclick() />
`,
...
funcs: {
onload: () => console.log('app load success >w<'),
onclick: () => console.log('clicked >w<'),
...
},
});
Runs when theres a new error.
shinobu.onError = (err) => console.error(err);
But you can kill errors.
shinobu.onError = (err) => {};