GitHub PullRequestReviewCommentEvent at 2014-02-05 08:01:27
Repository: gaia
Actor: crh0716
Payload: {"comment":{"url":"https://api.github.com/repos/crh0716/gaia/pulls/comments/9453027","id":9453027,"diff_hunk":"@@ -27,20 +35,11 @@ define(['modules/SettingsCache'], function(SettingsCache) {\n         link.href = '#';\n       }\n       if (!link.dataset.href.startsWith('#')) { // external link\n-        link.onclick = function() {","path":"apps/settings/js/modules/PanelUtils.js","position":28,"original_position":28,"commit_id":"eda98d19b78c98313910b52a6d1ddac3af81581e","original_commit_id":"eda98d19b78c98313910b52a6d1ddac3af81581e","user":{"login":"crh0716","id":2899280,"avatar_url":"https://gravatar.com/avatar/ab20989d946f4bd31c590b5a6ef73f7a?d=https%3A%2F%2Fidenticons.github.com%2F021394cc83b6f0d37aaaf1a268e7ab7d.png&r=x","gravatar_id":"ab20989d946f4bd31c590b5a6ef73f7a","url":"https://api.github.com/users/crh0716","html_url":"https://github.com/crh0716","followers_url":"https://api.github.com/users/crh0716/followers","following_url":"https://api.github.com/users/crh0716/following{/other_user}","gists_url":"https://api.github.com/users/crh0716/gists{/gist_id}","starred_url":"https://api.github.com/users/crh0716/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crh0716/subscriptions","organizations_url":"https://api.github.com/users/crh0716/orgs","repos_url":"https://api.github.com/users/crh0716/repos","events_url":"https://api.github.com/users/crh0716/events{/privacy}","received_events_url":"https://api.github.com/users/crh0716/received_events","type":"User","site_admin":false},"body":"I would like to keep the syntax `link.onclick = `. Can we make it as the following:\r\n```\r\nvar _onclick = function(callback, value) {\r\n  callback(value);\r\n  return false;\r\n};\r\n\r\n//...\r\n\r\nlink.onclick = _onclick.bind(self, self.openLink, self.dataset.href);\r\n```","created_at":"2014-02-05T08:01:27Z","updated_at":"2014-02-05T08:01:27Z","html_url":"https://github.com/crh0716/gaia/pull/16#discussion_r9453027","pull_request_url":"https://api.github.com/repos/crh0716/gaia/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/crh0716/gaia/pulls/comments/9453027"},"html":{"href":"https://github.com/crh0716/gaia/pull/16#discussion_r9453027"},"pull_request":{"href":"https://api.github.com/repos/crh0716/gaia/pulls/16"}}}}