According to the specification (https://muut.com/riotjs/guide/#event-handlers) event.relatedTarget should return the element that has the event-handler attached. But it returns 'null'. Is this a bug or what am I doing wrong?
See minimal example: http://jsfiddle.net/qfLut7h0/
--- html
<example>
<div onclick={event} class="handler">
<p class="clickedElement">click me</p>
</div>
<p>Clicked: {clickedElement}</p>
<p>Handler: {handler}</p>
event(e){
this.clickedElement = e.target;
this.handler = e.relatedTarget;
}
</example>
----
Tero Piirainen
Wed, 11 Feb 2015 06:19:21 GMT
That is actually a bug in documentation. Should be `currentTarget`. Will fix.
Thanks!