Executing javascript code that's returned within a Stimulus Reflex morph
I've got Stimulus Reflex up and running well, but was wondering if there's a way to have it execute javascript commands sent back in script tags within HTML rendered partials when they're added to the page dom? Seems like they don't execute by default.
Got a good answer to this on the Stimulus Reflex Discord and figured I'd share here. Basically executing the JS could be a CSP issue, and you'd want to use CableReady operations, such as afterReflex etc to call whatever JS code you need executed.