How to execute js function in Drab Commander

The values you set in the poke command are the Phoenix assigns. How are they bound to the elements? Like, how is “total_sent” assign bound to the element with ID “total-sent”?

like this
<p id="total-sent" data-total-sent="<%= @total_sent %>"><%= @total_sent %></p>

then I get the values in js like this

let total_sent = parseInt(document.getElementById("total-sent").dataset.totalSent);