SkillAgentSearch skills...

Embassy

[WIP] A Clojure(script) library to represent HTML diffs, to compose them together and to apply them on the DOM.

Install / Use

/learn @green-coder/Embassy
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Embassy

API

embassy.vdom.core/apply-vdom is the main function of the library, it applies a vdom-diff data structure (simply called vdom throughout the source code) to a dom-element.

A vdom-diff is created using the helper functions in the namespace embassy.vdom.helper. See the namespace embassy.vdom.helper-test for examples on how to use them.

embassy.vdom.core/comp is the second most important function of the library, it returns a composition of 2 vdom-diff data structures.

Use cases

This library can be used for updating the dom in a browser from a remote location, in an incremental way. For example, by sending the updates from a server connected to the browser via a websocket.

The demo application

Compile the source code via Shadow-CLJS:

npm install
npx shadow-cljs watch :app

Then browse the page at http://localhost:3000/

Running the tests while developing

./bin/kaocha --watch
View on GitHub
GitHub Stars6
CategoryDevelopment
Updated1y ago
Forks0

Languages

Clojure

Security Score

60/100

Audited on Feb 20, 2025

No findings