Adds one or more native DOM event listeners onto the underlying Element of this Game Object. The event is then dispatched via this Game Objects standard event emitter.
For example:
var div = this.add.dom(x, y, element);
div.addListener('click');
div.on('click', handler);
name | type | description |
---|---|---|
events | string |
The DOM event/s to listen for. You can specify multiple events by separating them with spaces. |
This DOM Element instance.