Listen for Turbo Frame Loads

Viewed 16

According to the Turbo Handbook, there is a turbo:frame-load event, so I was trying to listen to that, but doesn't seem to work.

<turbo-frame id: "content">
</turbo-frame>


JS:
const contentFrame = document.getElementById("content")
contentFrame.addEventListener("turbo:frame-load", event => {
     console.log("Hello New Content")
})
0 Answers
Related