Liking cljdoc? Tell your friends :D


Clojars Project

A ClojureScript library designed to dynamically add <script> tag to html DOM using prismatic/dommy

It actually helps handling dynamically adding by DOM scripts social buttons such as Telegram Login and etc...


(ns app.core
  (:require [cljs-add-script.core :refer [add-script!]]))    

(add-script! ""
    (fn [e]
      (println "Telegram login script loaded"))
    {:async               "async"
     :data-telegram-login ""
     :data-size           "medium"
     :data-userpic        "false"
     :data-onauth         "<your function here>"
     :data-radius         "5"
     :parent-sel          :#tg-login-fieldset})


  • :parent-sel dommy selector of parent element

which produces

<script type="text/javascript" async="async" data-telegram-login="" 
    data-size="medium" data-userpic="false" 
    data-onauth="<your function here>" data-radius="5" 


lein clean && lein with-profile dev doo phantom test once


Copyright © 2019 Vladislav Shishkov

This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at

This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version, with the GNU Classpath Exception which is available at

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close