1.0.0 • Published 1 month ago

snj v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

snj

"sinejs" but not like the one for application components.

safety

  • Eval - Experimental
  • States - Experimental but works properly in testing
  • Refs - Experimental but works properly in testing

  • Remote components - Functional (unsafe though - loads HTML from any URL).

  • Live-updating - Functional

  • HTTP - Functional
  • Safety - Functional

features

  • States - Reflects a specified property of an element on state listeners whose specified properties will be changed on the state's update.
  • Refs - Executes a specified function on ref listeners upon the updating of an element.

  • Remote components - Make your HTML modular by loading separate HTML documents as components inside of your main document!

  • Pagination - Allows you to receive information about a pagination target from a child, and switch between pagination targets in different contexts.

  • Eval - Timer-eval and eval allow you to immediately execute JavaScript extended with the current element.

  • HTTP - Make HTTP requests (GET, POST) upon a certain event. POST requests support reading values from refs, states and unsafely-evaluating code.

  • Live-updating - Added elements and elements with added SNJ attributes will immediately have all added SNJ attributes registered.

  • Safety - sn-ignore-children can be used to prevent users from running SNJ functions in child elements.