haskellyesodscript-tagyesod-forms

Yesod - how to make addScriptRemote add the script in the head section?


In Yesod/Haskell, I'd like to call addScriptRemote and have it add the <script> tag in the head section. As is, it seems to add the script only to the body section.


Solution

  • Where scripts get placed will depend on jsLoader. If you want to make a change for a specific script, you can use toWidgetHead [hamlet|<script src=...">|].