Polymer 1.0 Global Variables
Polymer element <iron-meta> is also an option. For me this was the easiest solution.
Polymer element <iron-meta> is also an option. For me this was the easiest solution.
It’s not available, but if you really would like to have this property, then you could extend the native prototype of the Event object like so: if (!(“path” in Event.prototype)) Object.defineProperty(Event.prototype, “path”, { get: function() { var path = []; var currentElem = this.target; while (currentElem) { path.push(currentElem); currentElem = currentElem.parentElement; } if (path.indexOf(window) === … Read more
You could utilize HTML5 data attributes instead. Try like this: <paper-button id=”foo” on-tap=”bar” data-args=”foo,some other value,2″>Click</paper-button> … <script> (function() { Polymer({ is: ‘example’, properties: {…}, bar: function(e){ var args = e.target.getAttribute(‘data-args’).split(‘,’); // now args = [‘foo’, ‘some other value’, ‘2’] } }); })(); </script>