{"action":"opened","issue":{"url":"https://api.github.com/repos/Polymer/docs/issues/1310","labels_url":"https://api.github.com/repos/Polymer/docs/issues/1310/labels{/name}","comments_url":"https://api.github.com/repos/Polymer/docs/issues/1310/comments","events_url":"https://api.github.com/repos/Polymer/docs/issues/1310/events","html_url":"https://github.com/Polymer/docs/issues/1310","id":102001414,"number":1310,"title":"Add examples for event retargeting","user":{"login":"arthurevans","id":1149422,"avatar_url":"https://avatars.githubusercontent.com/u/1149422?v=3","gravatar_id":"","url":"https://api.github.com/users/arthurevans","html_url":"https://github.com/arthurevans","followers_url":"https://api.github.com/users/arthurevans/followers","following_url":"https://api.github.com/users/arthurevans/following{/other_user}","gists_url":"https://api.github.com/users/arthurevans/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurevans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurevans/subscriptions","organizations_url":"https://api.github.com/users/arthurevans/orgs","repos_url":"https://api.github.com/users/arthurevans/repos","events_url":"https://api.github.com/users/arthurevans/events{/privacy}","received_events_url":"https://api.github.com/users/arthurevans/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-19T21:19:28Z","updated_at":"2015-08-19T21:19:28Z","closed_at":null,"body":"At the very least, we should add one for localTarget (which is probably the most frequently used) and maybe path. Inspiration:\r\n\r\nlocal target (gives you the logical target, which is what you \"probably\" want).\r\n\r\nhttps://github.com/PolymerElements/paper-drawer-panel/blob/master/paper-drawer-panel.html#L507-L516\r\nhttps://github.com/PolymerElements/iron-form/blob/f0b56d38f46af2095073c3525c5bc274673a9ee0/demo/index.html\r\n\r\nroot target gives you the \"deep\" target, so you could use it, for example, if you wanted to intercept any anchor clicks, no matter what shadow tree they lived in (breaks encapsulation, is probably bad, but there you go). Something like:\r\n\r\n```\r\ndocument.addEventListener('click', function(ev) {\r\n  var polymerEv = Polymer.dom(ev);\r\n  var t = polymerEv.rootTarget;\r\n  if (t.nodeType === Node.ELEMENT_NODE && t.localName === 'a') {\r\n    // push state\r\n  }\r\n});\r\n```\r\n\r\npath:\r\n\r\nhttps://github.com/Polymer/polymer/blob/master/src/standard/gestures.html#L51-L61"}}