High-performance JavaScript micro framework.
Warning: This is alpha software. Test thoroughly before using in production. Please report any bugs you find!
Originally a fork of the excellent https://github.com/Freak613/stage0 project.
innerHTML
— potencial risk of XSS etc.; never use h
and html
functions with untrusted input
Sanitizer.sanitizeFor(...)
which could be used to sanitize untrusted input
createFragment
create
append
prepend
onNodeRemove
stage0
project:
h
is now function h(template: string): S1Node
e.g., h('<p>#text<p>')
html
is available to use as a string template literal tag function e.g., html`<p>#text<p>`
stage1
reconcile
function/keyed
--> /reconcile/keyed
/reconcile
--> /reconcile/non-keyed
/reuse-nodes
--> /reconcile/reuse-nodes
store
factory can be imported from stage1/store
process.env.NODE_ENV
must be definedprocess.env.NODE_ENV === 'production
you must minify h
/html
strings with a compatible minifier
esbuild
+ esbuild-minify-templates
stage0
and other JS frameworksNote: Internet Explorer is not supported.
Minimum browser version required:
Some optional features require a higher browser version:
html
tagged template literal function uses String.raw
; requirements
createFragment
utility function uses DocumentFragment
; requirements
onNodeRemove
utility function uses for...of
; requirements
store
uses Proxy
; requirements
SSR via Node.js or Deno is not supported and is not the intended use of this library.
Please report any bugs you encounter on the GitHub issue tracker.
See releases on GitHub.
MIT license. See LICENSE.
© 2023 Max Milton