Add cljs-ajax plugin
This commit is contained in:
parent
0c0d5afacd
commit
f5b014864f
5 changed files with 27 additions and 5 deletions
14
src/scittle/cljs_ajax.cljs
Normal file
14
src/scittle/cljs_ajax.cljs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
(ns scittle.cljs-ajax
|
||||
(:require [ajax.core :as ajx]
|
||||
[sci.core :as sci]
|
||||
[scittle.core :as scittle]))
|
||||
|
||||
(def ans (sci/create-ns 'ajax.core nil))
|
||||
|
||||
(def ajax-namespace
|
||||
{'GET (sci/copy-var ajx/GET ans)
|
||||
'POST (sci/copy-var ajx/POST ans)})
|
||||
|
||||
(scittle/register-plugin!
|
||||
::ajax
|
||||
{:namespaces {'ajax.core ajax-namespace}})
|
||||
Loading…
Add table
Add a link
Reference in a new issue