{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/frontend/pulls/comments/23076251","id":23076251,"diff_hunk":"@@ -281,6 +290,18 @@ define([\n                 callbacks[size] && callbacks[size](event, $slot);\n             }\n         },\n+        allAdsRendered = function (slotId) {\n+            forEach(slots, function (value, key) {\n+                if (key === slotId) {\n+                    slots[slotId].isRendered = true;\n+                    return;\n+                }\n+            });","path":"static/src/javascripts/projects/common/modules/commercial/dfp.js","position":69,"original_position":69,"commit_id":"d68ee6112f4f6195e7ffb71fd64b9caf28298c0e","original_commit_id":"d68ee6112f4f6195e7ffb71fd64b9caf28298c0e","user":{"login":"ironsidevsquincy","id":74132,"avatar_url":"https://avatars.githubusercontent.com/u/74132?v=3","gravatar_id":"","url":"https://api.github.com/users/ironsidevsquincy","html_url":"https://github.com/ironsidevsquincy","followers_url":"https://api.github.com/users/ironsidevsquincy/followers","following_url":"https://api.github.com/users/ironsidevsquincy/following{/other_user}","gists_url":"https://api.github.com/users/ironsidevsquincy/gists{/gist_id}","starred_url":"https://api.github.com/users/ironsidevsquincy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ironsidevsquincy/subscriptions","organizations_url":"https://api.github.com/users/ironsidevsquincy/orgs","repos_url":"https://api.github.com/users/ironsidevsquincy/repos","events_url":"https://api.github.com/users/ironsidevsquincy/events{/privacy}","received_events_url":"https://api.github.com/users/ironsidevsquincy/received_events","type":"User","site_admin":false},"body":"you're looping, but not using `value` or `key` anywhere, i.e. all of this is this same as\r\n\r\n```\r\nslots[slotId].isRendered = true;\r\n```","created_at":"2015-01-16T11:51:24Z","updated_at":"2015-01-16T11:51:24Z","html_url":"https://github.com/guardian/frontend/pull/7765#discussion_r23076251","pull_request_url":"https://api.github.com/repos/guardian/frontend/pulls/7765","_links":{"self":{"href":"https://api.github.com/repos/guardian/frontend/pulls/comments/23076251"},"html":{"href":"https://github.com/guardian/frontend/pull/7765#discussion_r23076251"},"pull_request":{"href":"https://api.github.com/repos/guardian/frontend/pulls/7765"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/frontend/pulls/7765","id":27287723,"html_url":"https://github.com/guardian/frontend/pull/7765","diff_url":"https://github.com/guardian/frontend/pull/7765.diff","patch_url":"https://github.com/guardian/frontend/pull/7765.patch","issue_url":"https://api.github.com/repos/guardian/frontend/issues/7765","number":7765,"state":"open","locked":false,"title":"User timings event","user":{"login":"Calanthe","id":489567,"avatar_url":"https://avatars.githubusercontent.com/u/489567?v=3","gravatar_id":"","url":"https://api.github.com/users/Calanthe","html_url":"https://github.com/Calanthe","followers_url":"https://api.github.com/users/Calanthe/followers","following_url":"https://api.github.com/users/Calanthe/following{/other_user}","gists_url":"https://api.github.com/users/Calanthe/gists{/gist_id}","starred_url":"https://api.github.com/users/Calanthe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Calanthe/subscriptions","organizations_url":"https://api.github.com/users/Calanthe/orgs","repos_url":"https://api.github.com/users/Calanthe/repos","events_url":"https://api.github.com/users/Calanthe/events{/privacy}","received_events_url":"https://api.github.com/users/Calanthe/received_events","type":"User","site_admin":false},"body":"The 'user timings' event (http://www.html5rocks.com/en/tutorials/webperformance/usertiming/) is now fired when all of the dfp ads are fully rendered. That event should be visible now on the webpagetest (http://www.webpagetest.org/result/150112_BP_XFK/1/details/).","created_at":"2015-01-13T17:17:28Z","updated_at":"2015-01-16T11:51:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"55aea2a82f50dbab4a405392ca02298f4cf89e16","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/guardian/frontend/pulls/7765/commits","review_comments_url":"https://api.github.com/repos/guardian/frontend/pulls/7765/comments","review_comment_url":"https://api.github.com/repos/guardian/frontend/pulls/comments/{number}","comments_url":"https://api.github.com/repos/guardian/frontend/issues/7765/comments","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/d68ee6112f4f6195e7ffb71fd64b9caf28298c0e","head":{"label":"guardian:user-timings","ref":"user-timings","sha":"d68ee6112f4f6195e7ffb71fd64b9caf28298c0e","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":4370755,"name":"frontend","full_name":"guardian/frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/frontend","description":"Source for the Guardian's responsive site, coming soon to a desktop near you...","fork":false,"url":"https://api.github.com/repos/guardian/frontend","forks_url":"https://api.github.com/repos/guardian/frontend/forks","keys_url":"https://api.github.com/repos/guardian/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/frontend/teams","hooks_url":"https://api.github.com/repos/guardian/frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/frontend/events","assignees_url":"https://api.github.com/repos/guardian/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/frontend/tags","blobs_url":"https://api.github.com/repos/guardian/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/frontend/subscription","commits_url":"https://api.github.com/repos/guardian/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/frontend/issues/comments/{number}","contents_url":"https://api.github.com/repos/guardian/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/frontend/merges","archive_url":"https://api.github.com/repos/guardian/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/frontend/downloads","issues_url":"https://api.github.com/repos/guardian/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/frontend/releases{/id}","created_at":"2012-05-18T15:39:15Z","updated_at":"2015-01-16T11:50:11Z","pushed_at":"2015-01-16T11:50:20Z","git_url":"git://github.com/guardian/frontend.git","ssh_url":"git@github.com:guardian/frontend.git","clone_url":"https://github.com/guardian/frontend.git","svn_url":"https://github.com/guardian/frontend","homepage":"http://www.theguardian.com/uk?view=mobile","size":481042,"stargazers_count":2606,"watchers_count":2606,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":228,"mirror_url":null,"open_issues_count":187,"forks":228,"open_issues":187,"watchers":2606,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"c1bbf544bbaebadb94f61cd647dcbffce695b7ab","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":4370755,"name":"frontend","full_name":"guardian/frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/frontend","description":"Source for the Guardian's responsive site, coming soon to a desktop near you...","fork":false,"url":"https://api.github.com/repos/guardian/frontend","forks_url":"https://api.github.com/repos/guardian/frontend/forks","keys_url":"https://api.github.com/repos/guardian/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/frontend/teams","hooks_url":"https://api.github.com/repos/guardian/frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/frontend/events","assignees_url":"https://api.github.com/repos/guardian/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/frontend/tags","blobs_url":"https://api.github.com/repos/guardian/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/frontend/subscription","commits_url":"https://api.github.com/repos/guardian/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/frontend/issues/comments/{number}","contents_url":"https://api.github.com/repos/guardian/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/frontend/merges","archive_url":"https://api.github.com/repos/guardian/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/frontend/downloads","issues_url":"https://api.github.com/repos/guardian/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/frontend/releases{/id}","created_at":"2012-05-18T15:39:15Z","updated_at":"2015-01-16T11:50:11Z","pushed_at":"2015-01-16T11:50:20Z","git_url":"git://github.com/guardian/frontend.git","ssh_url":"git@github.com:guardian/frontend.git","clone_url":"https://github.com/guardian/frontend.git","svn_url":"https://github.com/guardian/frontend","homepage":"http://www.theguardian.com/uk?view=mobile","size":481042,"stargazers_count":2606,"watchers_count":2606,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":228,"mirror_url":null,"open_issues_count":187,"forks":228,"open_issues":187,"watchers":2606,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/frontend/pulls/7765"},"html":{"href":"https://github.com/guardian/frontend/pull/7765"},"issue":{"href":"https://api.github.com/repos/guardian/frontend/issues/7765"},"comments":{"href":"https://api.github.com/repos/guardian/frontend/issues/7765/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/frontend/pulls/7765/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/frontend/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/guardian/frontend/pulls/7765/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/frontend/statuses/d68ee6112f4f6195e7ffb71fd64b9caf28298c0e"}}}}