tleish
7
turbo beta 5 (just release) now updates the src= to the frame request is redirected.
With this, you could add a stimulus controller to observe the src change.
import ApplicationController from './application_controller';
export default class extends ApplicationController {
initialize() {
this.observeMutations(this.srcListener, this.element, { attributes: true })
}
srcListener(events){
if( this.element.src.match(/\/login$/) ){
window.location.reload()
}
}
}
2 Likes