{"action":"created","comment":{"url":"https://api.github.com/repos/Galooshi/happo/pulls/comments/82519570","pull_request_review_id":3423237,"id":82519570,"diff_hunk":"@@ -153,26 +154,33 @@ window.happo = {\n     return document.body.children;\n   },\n \n+  /**\n+   * @return {Promise}\n+   */\n   processExample(currentExample) {\n-    const rootNodes = this.getRootNodes();\n-    try {\n-      const {\n-        height,\n-        left,\n-        top,\n-        width,\n-      } = getFullRect(rootNodes);\n-\n-      return {\n-        description: currentExample.description,\n-        height,\n-        left,\n-        top,\n-        width,\n-      };\n-    } catch (error) {\n-      return handleError(currentExample, error);\n-    }\n+    return new Promise((resolve) => {\n+      waitForImagesToRender().then(() => {\n+        try {\n+          const rootNodes = this.getRootNodes();\n+          const {\n+            height,\n+            left,\n+            top,\n+            width,\n+          } = getFullRect(rootNodes);\n+\n+          resolve({\n+            description: currentExample.description,\n+            height,\n+            left,\n+            top,\n+            width,\n+          });\n+        } catch (error) {\n+          resolve(handleError(currentExample, error));","path":"js/src/HappoRunner.js","position":180,"original_position":78,"commit_id":"c4c1ed89bc8075b8707c11430ef454298772bec5","original_commit_id":"c4c1ed89bc8075b8707c11430ef454298772bec5","user":{"login":"trotzig","id":578277,"avatar_url":"https://avatars.githubusercontent.com/u/578277?v=3","gravatar_id":"","url":"https://api.github.com/users/trotzig","html_url":"https://github.com/trotzig","followers_url":"https://api.github.com/users/trotzig/followers","following_url":"https://api.github.com/users/trotzig/following{/other_user}","gists_url":"https://api.github.com/users/trotzig/gists{/gist_id}","starred_url":"https://api.github.com/users/trotzig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trotzig/subscriptions","organizations_url":"https://api.github.com/users/trotzig/orgs","repos_url":"https://api.github.com/users/trotzig/repos","events_url":"https://api.github.com/users/trotzig/events{/privacy}","received_events_url":"https://api.github.com/users/trotzig/received_events","type":"User","site_admin":false},"body":"I guess, although we end up calling the `doneFunc` with an object that the ruby code inspects. This used to be a return so I just made it resolve. ","created_at":"2016-10-09T10:26:52Z","updated_at":"2016-10-09T10:26:52Z","html_url":"https://github.com/Galooshi/happo/pull/163#discussion_r82519570","pull_request_url":"https://api.github.com/repos/Galooshi/happo/pulls/163","_links":{"self":{"href":"https://api.github.com/repos/Galooshi/happo/pulls/comments/82519570"},"html":{"href":"https://github.com/Galooshi/happo/pull/163#discussion_r82519570"},"pull_request":{"href":"https://api.github.com/repos/Galooshi/happo/pulls/163"}}},"pull_request":{"url":"https://api.github.com/repos/Galooshi/happo/pulls/163","id":88545537,"html_url":"https://github.com/Galooshi/happo/pull/163","diff_url":"https://github.com/Galooshi/happo/pull/163.diff","patch_url":"https://github.com/Galooshi/happo/pull/163.patch","issue_url":"https://api.github.com/repos/Galooshi/happo/issues/163","number":163,"state":"open","locked":false,"title":"No crop","user":{"login":"trotzig","id":578277,"avatar_url":"https://avatars.githubusercontent.com/u/578277?v=3","gravatar_id":"","url":"https://api.github.com/users/trotzig","html_url":"https://github.com/trotzig","followers_url":"https://api.github.com/users/trotzig/followers","following_url":"https://api.github.com/users/trotzig/following{/other_user}","gists_url":"https://api.github.com/users/trotzig/gists{/gist_id}","starred_url":"https://api.github.com/users/trotzig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trotzig/subscriptions","organizations_url":"https://api.github.com/users/trotzig/orgs","repos_url":"https://api.github.com/users/trotzig/repos","events_url":"https://api.github.com/users/trotzig/events{/privacy}","received_events_url":"https://api.github.com/users/trotzig/received_events","type":"User","site_admin":false},"body":"The goals of this PR are two-fold:\r\n\r\nA: fix #162 by loading images before the screenshot is taken\r\nB: re-implement [the screenshotting function from Selenium's firefox driver](https://github.com/SeleniumHQ/selenium/blob/ceaf3da79542024becdda5953059dfbb96fb3a90/javascript/firefox-driver/js/screenshooter.js#L23) and only grab the part of the screen we're interested in (hence the \"No crop\" name of the PR). ","created_at":"2016-10-08T13:11:52Z","updated_at":"2016-10-09T10:26:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4772b71714ea971a1dc6309f4dc65b3606139a8c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Galooshi/happo/pulls/163/commits","review_comments_url":"https://api.github.com/repos/Galooshi/happo/pulls/163/comments","review_comment_url":"https://api.github.com/repos/Galooshi/happo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Galooshi/happo/issues/163/comments","statuses_url":"https://api.github.com/repos/Galooshi/happo/statuses/c4c1ed89bc8075b8707c11430ef454298772bec5","head":{"label":"Galooshi:no-crop","ref":"no-crop","sha":"c4c1ed89bc8075b8707c11430ef454298772bec5","user":{"login":"Galooshi","id":17908199,"avatar_url":"https://avatars.githubusercontent.com/u/17908199?v=3","gravatar_id":"","url":"https://api.github.com/users/Galooshi","html_url":"https://github.com/Galooshi","followers_url":"https://api.github.com/users/Galooshi/followers","following_url":"https://api.github.com/users/Galooshi/following{/other_user}","gists_url":"https://api.github.com/users/Galooshi/gists{/gist_id}","starred_url":"https://api.github.com/users/Galooshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Galooshi/subscriptions","organizations_url":"https://api.github.com/users/Galooshi/orgs","repos_url":"https://api.github.com/users/Galooshi/repos","events_url":"https://api.github.com/users/Galooshi/events{/privacy}","received_events_url":"https://api.github.com/users/Galooshi/received_events","type":"Organization","site_admin":false},"repo":{"id":31054513,"name":"happo","full_name":"Galooshi/happo","owner":{"login":"Galooshi","id":17908199,"avatar_url":"https://avatars.githubusercontent.com/u/17908199?v=3","gravatar_id":"","url":"https://api.github.com/users/Galooshi","html_url":"https://github.com/Galooshi","followers_url":"https://api.github.com/users/Galooshi/followers","following_url":"https://api.github.com/users/Galooshi/following{/other_user}","gists_url":"https://api.github.com/users/Galooshi/gists{/gist_id}","starred_url":"https://api.github.com/users/Galooshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Galooshi/subscriptions","organizations_url":"https://api.github.com/users/Galooshi/orgs","repos_url":"https://api.github.com/users/Galooshi/repos","events_url":"https://api.github.com/users/Galooshi/events{/privacy}","received_events_url":"https://api.github.com/users/Galooshi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Galooshi/happo","description":"Happo is a visual diffing tool for JS components designed to run in a CI environment","fork":false,"url":"https://api.github.com/repos/Galooshi/happo","forks_url":"https://api.github.com/repos/Galooshi/happo/forks","keys_url":"https://api.github.com/repos/Galooshi/happo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Galooshi/happo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Galooshi/happo/teams","hooks_url":"https://api.github.com/repos/Galooshi/happo/hooks","issue_events_url":"https://api.github.com/repos/Galooshi/happo/issues/events{/number}","events_url":"https://api.github.com/repos/Galooshi/happo/events","assignees_url":"https://api.github.com/repos/Galooshi/happo/assignees{/user}","branches_url":"https://api.github.com/repos/Galooshi/happo/branches{/branch}","tags_url":"https://api.github.com/repos/Galooshi/happo/tags","blobs_url":"https://api.github.com/repos/Galooshi/happo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Galooshi/happo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Galooshi/happo/git/refs{/sha}","trees_url":"https://api.github.com/repos/Galooshi/happo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Galooshi/happo/statuses/{sha}","languages_url":"https://api.github.com/repos/Galooshi/happo/languages","stargazers_url":"https://api.github.com/repos/Galooshi/happo/stargazers","contributors_url":"https://api.github.com/repos/Galooshi/happo/contributors","subscribers_url":"https://api.github.com/repos/Galooshi/happo/subscribers","subscription_url":"https://api.github.com/repos/Galooshi/happo/subscription","commits_url":"https://api.github.com/repos/Galooshi/happo/commits{/sha}","git_commits_url":"https://api.github.com/repos/Galooshi/happo/git/commits{/sha}","comments_url":"https://api.github.com/repos/Galooshi/happo/comments{/number}","issue_comment_url":"https://api.github.com/repos/Galooshi/happo/issues/comments{/number}","contents_url":"https://api.github.com/repos/Galooshi/happo/contents/{+path}","compare_url":"https://api.github.com/repos/Galooshi/happo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Galooshi/happo/merges","archive_url":"https://api.github.com/repos/Galooshi/happo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Galooshi/happo/downloads","issues_url":"https://api.github.com/repos/Galooshi/happo/issues{/number}","pulls_url":"https://api.github.com/repos/Galooshi/happo/pulls{/number}","milestones_url":"https://api.github.com/repos/Galooshi/happo/milestones{/number}","notifications_url":"https://api.github.com/repos/Galooshi/happo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Galooshi/happo/labels{/name}","releases_url":"https://api.github.com/repos/Galooshi/happo/releases{/id}","deployments_url":"https://api.github.com/repos/Galooshi/happo/deployments","created_at":"2015-02-20T07:05:44Z","updated_at":"2016-10-06T01:44:35Z","pushed_at":"2016-10-08T13:11:53Z","git_url":"git://github.com/Galooshi/happo.git","ssh_url":"git@github.com:Galooshi/happo.git","clone_url":"https://github.com/Galooshi/happo.git","svn_url":"https://github.com/Galooshi/happo","homepage":"","size":9649,"stargazers_count":75,"watchers_count":75,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":24,"forks":5,"open_issues":24,"watchers":75,"default_branch":"master"}},"base":{"label":"Galooshi:master","ref":"master","sha":"b3610956c27650bcd7e6502dcd7f449c80c2907f","user":{"login":"Galooshi","id":17908199,"avatar_url":"https://avatars.githubusercontent.com/u/17908199?v=3","gravatar_id":"","url":"https://api.github.com/users/Galooshi","html_url":"https://github.com/Galooshi","followers_url":"https://api.github.com/users/Galooshi/followers","following_url":"https://api.github.com/users/Galooshi/following{/other_user}","gists_url":"https://api.github.com/users/Galooshi/gists{/gist_id}","starred_url":"https://api.github.com/users/Galooshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Galooshi/subscriptions","organizations_url":"https://api.github.com/users/Galooshi/orgs","repos_url":"https://api.github.com/users/Galooshi/repos","events_url":"https://api.github.com/users/Galooshi/events{/privacy}","received_events_url":"https://api.github.com/users/Galooshi/received_events","type":"Organization","site_admin":false},"repo":{"id":31054513,"name":"happo","full_name":"Galooshi/happo","owner":{"login":"Galooshi","id":17908199,"avatar_url":"https://avatars.githubusercontent.com/u/17908199?v=3","gravatar_id":"","url":"https://api.github.com/users/Galooshi","html_url":"https://github.com/Galooshi","followers_url":"https://api.github.com/users/Galooshi/followers","following_url":"https://api.github.com/users/Galooshi/following{/other_user}","gists_url":"https://api.github.com/users/Galooshi/gists{/gist_id}","starred_url":"https://api.github.com/users/Galooshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Galooshi/subscriptions","organizations_url":"https://api.github.com/users/Galooshi/orgs","repos_url":"https://api.github.com/users/Galooshi/repos","events_url":"https://api.github.com/users/Galooshi/events{/privacy}","received_events_url":"https://api.github.com/users/Galooshi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Galooshi/happo","description":"Happo is a visual diffing tool for JS components designed to run in a CI environment","fork":false,"url":"https://api.github.com/repos/Galooshi/happo","forks_url":"https://api.github.com/repos/Galooshi/happo/forks","keys_url":"https://api.github.com/repos/Galooshi/happo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Galooshi/happo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Galooshi/happo/teams","hooks_url":"https://api.github.com/repos/Galooshi/happo/hooks","issue_events_url":"https://api.github.com/repos/Galooshi/happo/issues/events{/number}","events_url":"https://api.github.com/repos/Galooshi/happo/events","assignees_url":"https://api.github.com/repos/Galooshi/happo/assignees{/user}","branches_url":"https://api.github.com/repos/Galooshi/happo/branches{/branch}","tags_url":"https://api.github.com/repos/Galooshi/happo/tags","blobs_url":"https://api.github.com/repos/Galooshi/happo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Galooshi/happo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Galooshi/happo/git/refs{/sha}","trees_url":"https://api.github.com/repos/Galooshi/happo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Galooshi/happo/statuses/{sha}","languages_url":"https://api.github.com/repos/Galooshi/happo/languages","stargazers_url":"https://api.github.com/repos/Galooshi/happo/stargazers","contributors_url":"https://api.github.com/repos/Galooshi/happo/contributors","subscribers_url":"https://api.github.com/repos/Galooshi/happo/subscribers","subscription_url":"https://api.github.com/repos/Galooshi/happo/subscription","commits_url":"https://api.github.com/repos/Galooshi/happo/commits{/sha}","git_commits_url":"https://api.github.com/repos/Galooshi/happo/git/commits{/sha}","comments_url":"https://api.github.com/repos/Galooshi/happo/comments{/number}","issue_comment_url":"https://api.github.com/repos/Galooshi/happo/issues/comments{/number}","contents_url":"https://api.github.com/repos/Galooshi/happo/contents/{+path}","compare_url":"https://api.github.com/repos/Galooshi/happo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Galooshi/happo/merges","archive_url":"https://api.github.com/repos/Galooshi/happo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Galooshi/happo/downloads","issues_url":"https://api.github.com/repos/Galooshi/happo/issues{/number}","pulls_url":"https://api.github.com/repos/Galooshi/happo/pulls{/number}","milestones_url":"https://api.github.com/repos/Galooshi/happo/milestones{/number}","notifications_url":"https://api.github.com/repos/Galooshi/happo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Galooshi/happo/labels{/name}","releases_url":"https://api.github.com/repos/Galooshi/happo/releases{/id}","deployments_url":"https://api.github.com/repos/Galooshi/happo/deployments","created_at":"2015-02-20T07:05:44Z","updated_at":"2016-10-06T01:44:35Z","pushed_at":"2016-10-08T13:11:53Z","git_url":"git://github.com/Galooshi/happo.git","ssh_url":"git@github.com:Galooshi/happo.git","clone_url":"https://github.com/Galooshi/happo.git","svn_url":"https://github.com/Galooshi/happo","homepage":"","size":9649,"stargazers_count":75,"watchers_count":75,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":24,"forks":5,"open_issues":24,"watchers":75,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Galooshi/happo/pulls/163"},"html":{"href":"https://github.com/Galooshi/happo/pull/163"},"issue":{"href":"https://api.github.com/repos/Galooshi/happo/issues/163"},"comments":{"href":"https://api.github.com/repos/Galooshi/happo/issues/163/comments"},"review_comments":{"href":"https://api.github.com/repos/Galooshi/happo/pulls/163/comments"},"review_comment":{"href":"https://api.github.com/repos/Galooshi/happo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Galooshi/happo/pulls/163/commits"},"statuses":{"href":"https://api.github.com/repos/Galooshi/happo/statuses/c4c1ed89bc8075b8707c11430ef454298772bec5"}}}}
{"actor":{"display_login":"trotzig"}}