{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/10774","labels_url":"https://api.github.com/repos/emberjs/ember.js/issues/10774/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/ember.js/issues/10774/comments","events_url":"https://api.github.com/repos/emberjs/ember.js/issues/10774/events","html_url":"https://github.com/emberjs/ember.js/issues/10774","id":65316410,"number":10774,"title":"Binding event attributes `onclick={{exprAsString}}` doesn't work as expected","user":{"login":"jayphelps","id":762949,"avatar_url":"https://avatars.githubusercontent.com/u/762949?v=3","gravatar_id":"","url":"https://api.github.com/users/jayphelps","html_url":"https://github.com/jayphelps","followers_url":"https://api.github.com/users/jayphelps/followers","following_url":"https://api.github.com/users/jayphelps/following{/other_user}","gists_url":"https://api.github.com/users/jayphelps/gists{/gist_id}","starred_url":"https://api.github.com/users/jayphelps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayphelps/subscriptions","organizations_url":"https://api.github.com/users/jayphelps/orgs","repos_url":"https://api.github.com/users/jayphelps/repos","events_url":"https://api.github.com/users/jayphelps/events{/privacy}","received_events_url":"https://api.github.com/users/jayphelps/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-30T22:21:15Z","updated_at":"2015-03-30T23:24:54Z","closed_at":null,"body":"Without getting into the security/best practice debate, I'm curious if the current behavior of template bindings to [Event Attributes](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Event_attributes) is correct? Seems counterintuitive.\r\n\r\n```hbs\r\n{{!-- Hardcoded, works fine. --}}\r\n<button onclick=\"alert('such wow');\"></button>\r\n\r\n{{!-- Via binding, doesn't work. --}}\r\n<button onclick={{exprAsString}}></button>\r\n<button onclick=\"{{exprAsString}}\"></button>\r\n```\r\n\r\nThis is due to Ember/HTMLBars \"property-first\" rule; if a the normalized key exists on the DOM object as a property, it is set instead of using `setAttribute`. It would seem this is another exception to the norm, similar to SVG, `style`, `class`, etc.\r\n\r\nHere's an example showing the various behaviors:\r\nhttp://emberjs.jsbin.com/boterobubo/1/edit"},"comment":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/comments/87875129","html_url":"https://github.com/emberjs/ember.js/issues/10774#issuecomment-87875129","issue_url":"https://api.github.com/repos/emberjs/ember.js/issues/10774","id":87875129,"user":{"login":"mmun","id":1151810,"avatar_url":"https://avatars.githubusercontent.com/u/1151810?v=3","gravatar_id":"","url":"https://api.github.com/users/mmun","html_url":"https://github.com/mmun","followers_url":"https://api.github.com/users/mmun/followers","following_url":"https://api.github.com/users/mmun/following{/other_user}","gists_url":"https://api.github.com/users/mmun/gists{/gist_id}","starred_url":"https://api.github.com/users/mmun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmun/subscriptions","organizations_url":"https://api.github.com/users/mmun/orgs","repos_url":"https://api.github.com/users/mmun/repos","events_url":"https://api.github.com/users/mmun/events{/privacy}","received_events_url":"https://api.github.com/users/mmun/received_events","type":"User","site_admin":false},"created_at":"2015-03-30T23:24:54Z","updated_at":"2015-03-30T23:24:54Z","body":"Double curlies are too much work. I'm ok with supporting triple curlies."}}