I realize a change event handler is not a silver bullet for handling this, but it should catch auto filling at any time as long as a change event is triggered along with the auto fill. Works with Chrome and LastPass.
Whether or not the change event is fired is up to browser and extension developers. Where the events are not fired, this could be used as a workaround: https://github.com/tbosch/autofill-event
I realize a change event handler is not a silver bullet for handling this, but it should catch auto filling at any time as long as a change event is triggered along with the auto fill. Works with Chrome and LastPass.
Whether or not the change event is fired is up to browser and extension developers. Where the events are not fired, this could be used as a workaround: https://github.com/tbosch/autofill-event
For what it's worth, the WHATWG spec requires user agents to fire the event after auto filling: https://html.spec.whatwg.org/multipage/forms.html#event-input-change (end of chapter).