3

How would I render an async script tag in hiccup?

<script src="demo_async.js" async></script>
Nathan Davis
  • 5,636
  • 27
  • 39
nha
  • 17,623
  • 13
  • 87
  • 133

1 Answers1

3

I think you should just code it as

(use 'hiccup.core)
(html
  [:script {:src "demo_async.js"  :async "async"} ] )

  =>  <script src="demo_async.js" async="async" ></script>

Reference: http://www.w3schools.com/tags/tag_script.asp

Alan Thompson
  • 29,276
  • 6
  • 41
  • 48