I was wondering how I can capture events which occur from a child element from the parent as shown below. I know this method works to capture events using this
but I need it from the child element.
I don't want to capture the event from the li
and transfer information to foo
through global variables or other such means because I'll ultimately be implementing a mousemove
event which sends the position of the mouse per trigger, and it would be extremely inefficient sending this through the global variables technique (like as demonstrated in the API here) and slow down the app.
<polymer-element name="foo">
<template>
<ul>
<li>This is my child element</li>
</ul>
</template>
<script>
Polymer('foo', {
ready: function() {
document.querySelector('li').addEventListener('mousedown', function() {
console.log('mousedown event working');
})
}
});
</script>
</polymer-element>
Thanks in advance for any insight you may provide.