You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Print handlers and datafy/nav for built-in browser types
Features
Include lambdaisland.dom-types in your ClojureScript build to get print and pprint handlers for various built-in types. This way instead of printing #object[HTMLElement] you'll get #js/Element [:div "hello"].
These are currently implemented:
Text
Element
DocumentFragment
HTMLDocument
XMLDocument
Document
DOMStringMap
Window
Location
HTMLCollection
NodeList
KeyboardEvent
TouchEvent
Touch
TouchList
PointerEvent
MouseEvent
WheelEvent
DragEvent
Blob
File
This project is a stamp collection. Being exhaustive is not a stated goal, but pull requests that add other common built-in types are welcome.
Installation
To use the latest release, add the following to your deps.edn (Clojure CLI)
write patches that solve a problem. Start by stating the problem, then supply a minimal solution. *
agree to license their contributions as MPL 2.0.
not break the contract with downstream consumers. **
not break the tests.
Contributors SHOULD
update the CHANGELOG and README.
add tests for new functionality.
If you submit a pull request that adheres to these rules, then it will almost
certainly be merged immediately. However some things may require more
consideration. If you add new dependencies, or significantly increase the API
surface, then we need to decide if these changes are in line with the project's
goals. In this case you can start by writing a pitch,
and collecting feedback on it.
* This goes for features too, a feature needs to solve a problem. State the problem it solves, then supply a minimal solution.
** As long as this project has not seen a public release (i.e. is not on Clojars)
we may still consider making breaking changes, if there is consensus that the
changes are justified.