{"action":"created","issue":{"url":"https://api.github.com/repos/Polymer/polymer/issues/2466","repository_url":"https://api.github.com/repos/Polymer/polymer","labels_url":"https://api.github.com/repos/Polymer/polymer/issues/2466/labels{/name}","comments_url":"https://api.github.com/repos/Polymer/polymer/issues/2466/comments","events_url":"https://api.github.com/repos/Polymer/polymer/issues/2466/events","html_url":"https://github.com/Polymer/polymer/issues/2466","id":107701960,"number":2466,"title":"call super() method for behavior inheritance / overloading","user":{"login":"gronke","id":473924,"avatar_url":"https://avatars.githubusercontent.com/u/473924?v=3","gravatar_id":"","url":"https://api.github.com/users/gronke","html_url":"https://github.com/gronke","followers_url":"https://api.github.com/users/gronke/followers","following_url":"https://api.github.com/users/gronke/following{/other_user}","gists_url":"https://api.github.com/users/gronke/gists{/gist_id}","starred_url":"https://api.github.com/users/gronke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gronke/subscriptions","organizations_url":"https://api.github.com/users/gronke/orgs","repos_url":"https://api.github.com/users/gronke/repos","events_url":"https://api.github.com/users/gronke/events{/privacy}","received_events_url":"https://api.github.com/users/gronke/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2015-09-22T12:09:57Z","updated_at":"2016-08-03T20:35:12Z","closed_at":"2015-09-28T18:22:34Z","body":"When using behaviors for element composition/inheritance it would be neat to be able to call `super()` on overloaded methods. I'd expect `super()` to look in the previous inherited behavior for a function with the same name.\r\n\r\n```javascript\r\nvar SuperBehavior = {\r\n  attached: function() {\r\n    this.doSomething();\r\n  },\r\n  doSomething: function() {\r\n    console.log('foo');\r\n }\r\n}\r\n\r\nPolymer({\r\n  is: 'super-demo',\r\n  behaviors: [SuperBehavior],\r\n  doSomething() {\r\n    super();\r\n    console.log('bar');\r\n  }\r\n});\r\n```\r\n\r\n### expected console output\r\n```\r\nfoo\r\nbar\r\n```"},"comment":{"url":"https://api.github.com/repos/Polymer/polymer/issues/comments/237364378","html_url":"https://github.com/Polymer/polymer/issues/2466#issuecomment-237364378","issue_url":"https://api.github.com/repos/Polymer/polymer/issues/2466","id":237364378,"user":{"login":"pik","id":10236920,"avatar_url":"https://avatars.githubusercontent.com/u/10236920?v=3","gravatar_id":"","url":"https://api.github.com/users/pik","html_url":"https://github.com/pik","followers_url":"https://api.github.com/users/pik/followers","following_url":"https://api.github.com/users/pik/following{/other_user}","gists_url":"https://api.github.com/users/pik/gists{/gist_id}","starred_url":"https://api.github.com/users/pik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pik/subscriptions","organizations_url":"https://api.github.com/users/pik/orgs","repos_url":"https://api.github.com/users/pik/repos","events_url":"https://api.github.com/users/pik/events{/privacy}","received_events_url":"https://api.github.com/users/pik/received_events","type":"User","site_admin":false},"created_at":"2016-08-03T20:35:12Z","updated_at":"2016-08-03T20:35:12Z","body":"I'd suggest re-opening this - if an element takes on multiple behaviours, especially since some behaviours are actually arrays containing several - it can take lookup time to determine which behaviour to call for the super method. It would make great sense if `super()` just worked, perhaps with es6 classes this will be possible to do for behaviours ? "}}
{"actor":{"display_login":"pik"}}