Fire pointerout when the pointer leaves the canvas

I have a “pointerover” and “pointerout” event on my game object and would like “pointerout” to fire when the pointer leaves the canvas (or passes over an element in the DOM container).

Is this possible and what would be the best solution?

Edit: I found this.input.events.on('gameout', ...); but maybe there is a better way? This method also doesn’t seem to work quite correctly, no “pointerover” is triggered when returning to the canvas, only after “pointerout” is triggered does it do so again.