sprae 10.9.3 → 10.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/sprae.js CHANGED
@@ -22,3 +22,9 @@ sprae.use(signals)
22
22
  sprae.use({ compile: expr => sprae.constructor(`with (arguments[0]) { return ${expr} };`) })
23
23
 
24
24
  export default sprae
25
+
26
+ // standalone run
27
+ if (document?.currentScript) {
28
+ window.sprae = sprae
29
+ if (document.currentScript.hasAttribute('init')) sprae(document.documentElement);
30
+ }