Skip to content
This repository has been archived by the owner on Jul 31, 2022. It is now read-only.
/ synergize Public archive

Extend core and browser Javascript object *instances* with ClojureScript core protocols

Notifications You must be signed in to change notification settings

pangloss/synergize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Synergize

A ClojureScript library that uses specify extends JavaScript object instances with ClojureScript core protocols.

The current implementation is focussed primarily on DOM collection objects.

Currently supported collection types:

  • NodeList is returned by most DOM methods that produce a collection of objects.
  • DOMCollection is returned by other DOM methods for a collection of objects
  • NamedNodeMap is returned by any node's attributes property
  • StyleSheetList
  • CSSRuleList
  • CSSStyleDeclaration

Usage

The synergize! multimethod will apply the correct protocol specifications to any supported type.

(ns your.project
  (:require [synergize.browser :refer [synergize!]]))

; Now you can natively work with 
(doseq [element (synergize! js/document.body.childNodes)]
  (.log js/console "Do something with" element))

License

Copyright © 2013 Darrick Wiebe

Distributed under the Eclipse Public License, the same as Clojure.

About

Extend core and browser Javascript object *instances* with ClojureScript core protocols

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published