Polymer 1.0: What native methods are available to event targets? -
this documentation describes polymer's event retargeting.
following documentation, have obtained "normalized event object" (neo) using polymer.dom(event)
.
neither event retargeting documentation nor api documentation describes native methods available (like .getattribute()
). example, see amit's answer this question.
what native methods available normalized event object? , documented?
a normalized event object has 3 properties listed: roottarget
, localtarget
, , path
. first 2 element/node objects while path
array of nodes @ event passes through. little snippet above solved using either of first two, i'd suggest using localtarget
instead since it's retargeted one.
var obj = polymer.dom(event).localtarget; var arg = obj.getattribute('data-foo'); // or obj.dataset.foo
Comments
Post a Comment