#Importing htmx script in nakai

1 messages · Page 1 of 1 (latest)

lament bobcat
#

Hey! Can someone pls help with that: trying to use wisp + nakai + htmx and wondering how to have script tag with src to load htmx, as for some reason html.Script in nakai does not accept list of attrs and only string, so not sure how to do that lucydunno

rich wraith
#

Hey, I ran into that issue as well. I went with the generic html.Element:
html.Element( "script", [ attrs.src("https://unpkg.com/[email protected]"), attrs.integrity( "sha384-D1Kt99CQMDuVetoL1lrYwg5t+9QdHe7NLX/SoJYkXDFfX37iInKRy5xLSi8nO7UC", ), attrs.Attr("crossorigin", "anonymous"), ], [], ),

#

Although maybe LeafElement is a better choice, since it shouldn't have children.
Edit: Tried LeafElement and sometimes weird stuff happens such that subsequent scripts don't load properly. regular Element works just fine for me