Use $event.target as follows:
<span click.trigger="passDom($event.target)">Pass Dom Element</span>
You can learn more about the DOM events at Aurelia Hub .
Use the special $ event property to access the DOM event in your binding expression.
Alternatively, you can create a link to the DOM event and use it from the view model:
<span click.trigger="passDom()" ref="myElement">Pass Dom Element</span> // in view model export class Test { passDom() { console.log(this.myElement); } }
Also available at Aurelia Hub .
Use the ref binding command to create a reference to the DOM element. The simplest syntax for the ref command is ref="expression" . When a view is bound to data, the specified expression is assigned a DOM element.
source share