You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
io.pedestal.app.render.push.templates/update-template uses dom/set-html! to re-render its data. This is a problem if you have previously placed event listeners on the html element that was previously there, it gets wiped out.
[domina :as dom]
[domina.css :as dc]
[domina.events :as de]
(de/listen! (dc/sel"h1") :dblclick
(fn [e] (dom/set-html! (dc/sel"#stuff") "I am new html")))
(de/listen! (dom/by-id"stuff") :dblclick
(fn [e] (.log js/console "I was clicked on")))
<h1>Header</h1><divid="stuff">Click on me</div>
You can use the event handler for #stuff until you double click the header, then it will wipe out #stuff. It no longer responds to double click events.
The text was updated successfully, but these errors were encountered:
io.pedestal.app.render.push.templates/update-template uses dom/set-html! to re-render its data. This is a problem if you have previously placed event listeners on the html element that was previously there, it gets wiped out.
You can use the event handler for #stuff until you double click the header, then it will wipe out #stuff. It no longer responds to double click events.
The text was updated successfully, but these errors were encountered: