{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/universal-search-content/pulls/comments/46690441","id":46690441,"diff_hunk":"@@ -21,5 +27,35 @@ export default BaseView.extend({\n \n   sendSelectionDetails (event) {\n     webChannel.sendUrlSelected(this.model.url, 'url');\n+  },\n+\n+  injectFavicon () {\n+    // Manually construct the favicon element and inject it into the DOM,\n+    // allowing us to handle events directly, since load events don't bubble\n+    // and cannot be delegated.\n+    this.icon = new Image('img');\n+    this.icon.onload = this.calculateIconColor();\n+    this.icon.onerror = this.hideErroredFavicon();\n+    this.icon.src = this.model.displayImage();\n+    this.iconContainer.appendChild(this.icon);\n+  },\n+\n+  hideErroredFavicon () {\n+    return () => {\n+      this.icon.style.display = 'none';\n+    }.bind(this);\n+  },\n+\n+  calculateIconColor () {\n+    // If able to do so in 20ms or less, calculate the dominant color of the\n+    // favicon and set that to the background color of its parent.\n+    return () => {\n+      const START = new Date().getTime();","path":"src/views/activity/activity_item_view.js","position":46,"original_position":46,"commit_id":"631564d9b0da5b54c2f5aeaed1dadf7f98860e31","original_commit_id":"631564d9b0da5b54c2f5aeaed1dadf7f98860e31","user":{"login":"6a68","id":96396,"avatar_url":"https://avatars.githubusercontent.com/u/96396?v=3","gravatar_id":"","url":"https://api.github.com/users/6a68","html_url":"https://github.com/6a68","followers_url":"https://api.github.com/users/6a68/followers","following_url":"https://api.github.com/users/6a68/following{/other_user}","gists_url":"https://api.github.com/users/6a68/gists{/gist_id}","starred_url":"https://api.github.com/users/6a68/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/6a68/subscriptions","organizations_url":"https://api.github.com/users/6a68/orgs","repos_url":"https://api.github.com/users/6a68/repos","events_url":"https://api.github.com/users/6a68/events{/privacy}","received_events_url":"https://api.github.com/users/6a68/received_events","type":"User","site_admin":false},"body":"It is pretty verbose, and you don't strictly need high-res timestamps there, so yeah, just leave it as is.","created_at":"2015-12-04T15:06:10Z","updated_at":"2015-12-04T15:06:10Z","html_url":"https://github.com/mozilla/universal-search-content/pull/100#discussion_r46690441","pull_request_url":"https://api.github.com/repos/mozilla/universal-search-content/pulls/100","_links":{"self":{"href":"https://api.github.com/repos/mozilla/universal-search-content/pulls/comments/46690441"},"html":{"href":"https://github.com/mozilla/universal-search-content/pull/100#discussion_r46690441"},"pull_request":{"href":"https://api.github.com/repos/mozilla/universal-search-content/pulls/100"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/universal-search-content/pulls/100","id":52532692,"html_url":"https://github.com/mozilla/universal-search-content/pull/100","diff_url":"https://github.com/mozilla/universal-search-content/pull/100.diff","patch_url":"https://github.com/mozilla/universal-search-content/pull/100.patch","issue_url":"https://api.github.com/repos/mozilla/universal-search-content/issues/100","number":100,"state":"open","locked":false,"title":"Move favicon event delegation into views (closes #99).","user":{"login":"chuckharmston","id":23885,"avatar_url":"https://avatars.githubusercontent.com/u/23885?v=3","gravatar_id":"","url":"https://api.github.com/users/chuckharmston","html_url":"https://github.com/chuckharmston","followers_url":"https://api.github.com/users/chuckharmston/followers","following_url":"https://api.github.com/users/chuckharmston/following{/other_user}","gists_url":"https://api.github.com/users/chuckharmston/gists{/gist_id}","starred_url":"https://api.github.com/users/chuckharmston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuckharmston/subscriptions","organizations_url":"https://api.github.com/users/chuckharmston/orgs","repos_url":"https://api.github.com/users/chuckharmston/repos","events_url":"https://api.github.com/users/chuckharmston/events{/privacy}","received_events_url":"https://api.github.com/users/chuckharmston/received_events","type":"User","site_admin":false},"body":"r? @6a68 \r\n\r\nI think this is along the lines of what you were suggesting. ","created_at":"2015-12-03T13:18:30Z","updated_at":"2015-12-04T15:06:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c1b28ef97757858b36f45ed29d6664c37daae91","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/universal-search-content/pulls/100/commits","review_comments_url":"https://api.github.com/repos/mozilla/universal-search-content/pulls/100/comments","review_comment_url":"https://api.github.com/repos/mozilla/universal-search-content/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/universal-search-content/issues/100/comments","statuses_url":"https://api.github.com/repos/mozilla/universal-search-content/statuses/631564d9b0da5b54c2f5aeaed1dadf7f98860e31","head":{"label":"chuckharmston:99-favicon-events","ref":"99-favicon-events","sha":"631564d9b0da5b54c2f5aeaed1dadf7f98860e31","user":{"login":"chuckharmston","id":23885,"avatar_url":"https://avatars.githubusercontent.com/u/23885?v=3","gravatar_id":"","url":"https://api.github.com/users/chuckharmston","html_url":"https://github.com/chuckharmston","followers_url":"https://api.github.com/users/chuckharmston/followers","following_url":"https://api.github.com/users/chuckharmston/following{/other_user}","gists_url":"https://api.github.com/users/chuckharmston/gists{/gist_id}","starred_url":"https://api.github.com/users/chuckharmston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuckharmston/subscriptions","organizations_url":"https://api.github.com/users/chuckharmston/orgs","repos_url":"https://api.github.com/users/chuckharmston/repos","events_url":"https://api.github.com/users/chuckharmston/events{/privacy}","received_events_url":"https://api.github.com/users/chuckharmston/received_events","type":"User","site_admin":false},"repo":{"id":43758868,"name":"universal-search-content","full_name":"chuckharmston/universal-search-content","owner":{"login":"chuckharmston","id":23885,"avatar_url":"https://avatars.githubusercontent.com/u/23885?v=3","gravatar_id":"","url":"https://api.github.com/users/chuckharmston","html_url":"https://github.com/chuckharmston","followers_url":"https://api.github.com/users/chuckharmston/followers","following_url":"https://api.github.com/users/chuckharmston/following{/other_user}","gists_url":"https://api.github.com/users/chuckharmston/gists{/gist_id}","starred_url":"https://api.github.com/users/chuckharmston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuckharmston/subscriptions","organizations_url":"https://api.github.com/users/chuckharmston/orgs","repos_url":"https://api.github.com/users/chuckharmston/repos","events_url":"https://api.github.com/users/chuckharmston/events{/privacy}","received_events_url":"https://api.github.com/users/chuckharmston/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chuckharmston/universal-search-content","description":"the iframe that we put inside the autocomplete dropdown","fork":true,"url":"https://api.github.com/repos/chuckharmston/universal-search-content","forks_url":"https://api.github.com/repos/chuckharmston/universal-search-content/forks","keys_url":"https://api.github.com/repos/chuckharmston/universal-search-content/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chuckharmston/universal-search-content/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chuckharmston/universal-search-content/teams","hooks_url":"https://api.github.com/repos/chuckharmston/universal-search-content/hooks","issue_events_url":"https://api.github.com/repos/chuckharmston/universal-search-content/issues/events{/number}","events_url":"https://api.github.com/repos/chuckharmston/universal-search-content/events","assignees_url":"https://api.github.com/repos/chuckharmston/universal-search-content/assignees{/user}","branches_url":"https://api.github.com/repos/chuckharmston/universal-search-content/branches{/branch}","tags_url":"https://api.github.com/repos/chuckharmston/universal-search-content/tags","blobs_url":"https://api.github.com/repos/chuckharmston/universal-search-content/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chuckharmston/universal-search-content/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chuckharmston/universal-search-content/git/refs{/sha}","trees_url":"https://api.github.com/repos/chuckharmston/universal-search-content/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chuckharmston/universal-search-content/statuses/{sha}","languages_url":"https://api.github.com/repos/chuckharmston/universal-search-content/languages","stargazers_url":"https://api.github.com/repos/chuckharmston/universal-search-content/stargazers","contributors_url":"https://api.github.com/repos/chuckharmston/universal-search-content/contributors","subscribers_url":"https://api.github.com/repos/chuckharmston/universal-search-content/subscribers","subscription_url":"https://api.github.com/repos/chuckharmston/universal-search-content/subscription","commits_url":"https://api.github.com/repos/chuckharmston/universal-search-content/commits{/sha}","git_commits_url":"https://api.github.com/repos/chuckharmston/universal-search-content/git/commits{/sha}","comments_url":"https://api.github.com/repos/chuckharmston/universal-search-content/comments{/number}","issue_comment_url":"https://api.github.com/repos/chuckharmston/universal-search-content/issues/comments{/number}","contents_url":"https://api.github.com/repos/chuckharmston/universal-search-content/contents/{+path}","compare_url":"https://api.github.com/repos/chuckharmston/universal-search-content/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chuckharmston/universal-search-content/merges","archive_url":"https://api.github.com/repos/chuckharmston/universal-search-content/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chuckharmston/universal-search-content/downloads","issues_url":"https://api.github.com/repos/chuckharmston/universal-search-content/issues{/number}","pulls_url":"https://api.github.com/repos/chuckharmston/universal-search-content/pulls{/number}","milestones_url":"https://api.github.com/repos/chuckharmston/universal-search-content/milestones{/number}","notifications_url":"https://api.github.com/repos/chuckharmston/universal-search-content/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chuckharmston/universal-search-content/labels{/name}","releases_url":"https://api.github.com/repos/chuckharmston/universal-search-content/releases{/id}","created_at":"2015-10-06T15:15:51Z","updated_at":"2015-10-06T15:15:52Z","pushed_at":"2015-12-03T19:35:45Z","git_url":"git://github.com/chuckharmston/universal-search-content.git","ssh_url":"git@github.com:chuckharmston/universal-search-content.git","clone_url":"https://github.com/chuckharmston/universal-search-content.git","svn_url":"https://github.com/chuckharmston/universal-search-content","homepage":"","size":192,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"a963a04ecacdcb90e07226572b7f42a5e59e2443","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":33379085,"name":"universal-search-content","full_name":"mozilla/universal-search-content","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/universal-search-content","description":"the iframe that we put inside the autocomplete dropdown","fork":false,"url":"https://api.github.com/repos/mozilla/universal-search-content","forks_url":"https://api.github.com/repos/mozilla/universal-search-content/forks","keys_url":"https://api.github.com/repos/mozilla/universal-search-content/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/universal-search-content/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/universal-search-content/teams","hooks_url":"https://api.github.com/repos/mozilla/universal-search-content/hooks","issue_events_url":"https://api.github.com/repos/mozilla/universal-search-content/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/universal-search-content/events","assignees_url":"https://api.github.com/repos/mozilla/universal-search-content/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/universal-search-content/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/universal-search-content/tags","blobs_url":"https://api.github.com/repos/mozilla/universal-search-content/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/universal-search-content/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/universal-search-content/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/universal-search-content/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/universal-search-content/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/universal-search-content/languages","stargazers_url":"https://api.github.com/repos/mozilla/universal-search-content/stargazers","contributors_url":"https://api.github.com/repos/mozilla/universal-search-content/contributors","subscribers_url":"https://api.github.com/repos/mozilla/universal-search-content/subscribers","subscription_url":"https://api.github.com/repos/mozilla/universal-search-content/subscription","commits_url":"https://api.github.com/repos/mozilla/universal-search-content/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/universal-search-content/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/universal-search-content/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/universal-search-content/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/universal-search-content/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/universal-search-content/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/universal-search-content/merges","archive_url":"https://api.github.com/repos/mozilla/universal-search-content/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/universal-search-content/downloads","issues_url":"https://api.github.com/repos/mozilla/universal-search-content/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/universal-search-content/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/universal-search-content/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/universal-search-content/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/universal-search-content/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/universal-search-content/releases{/id}","created_at":"2015-04-03T19:27:42Z","updated_at":"2015-10-06T15:15:46Z","pushed_at":"2015-12-04T14:45:59Z","git_url":"git://github.com/mozilla/universal-search-content.git","ssh_url":"git@github.com:mozilla/universal-search-content.git","clone_url":"https://github.com/mozilla/universal-search-content.git","svn_url":"https://github.com/mozilla/universal-search-content","homepage":"","size":206,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":29,"forks":5,"open_issues":29,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/universal-search-content/pulls/100"},"html":{"href":"https://github.com/mozilla/universal-search-content/pull/100"},"issue":{"href":"https://api.github.com/repos/mozilla/universal-search-content/issues/100"},"comments":{"href":"https://api.github.com/repos/mozilla/universal-search-content/issues/100/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/universal-search-content/pulls/100/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/universal-search-content/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/universal-search-content/pulls/100/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/universal-search-content/statuses/631564d9b0da5b54c2f5aeaed1dadf7f98860e31"}}}}