{"action":"created","comment":{"url":"https://api.github.com/repos/ampproject/worker-dom/pulls/comments/229527764","pull_request_review_id":170049487,"id":229527764,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTUyNzc2NA==","diff_hunk":"@@ -15,21 +15,26 @@\n  */\n \n let count: number = 0;\n-const STRINGS: Map<number, string> = new Map();\n+const strings: Map<number, string> = new Map();\n \n /**\n  * Return a string for the specified index.\n  * @param index string index to retrieve.\n  * @returns string in map for the index.\n  */\n-export function getString(index: number): string {\n-  return STRINGS.get(index) || '';\n+export function get(index: number): string {\n+  return strings.get(index) || '';\n }\n \n /**\n- * Stores a string for parsing from mutation\n- * @param value string to store from background thread.\n+ * Stores a string in mapping and returns the index of the location.\n+ * @param value string to store\n+ * @return location in map\n  */\n-export function storeString(value: string): void {\n-  STRINGS.set(++count, value);\n+export function store(value: string): number {\n+  // When the main thread is in mutation phase, all additions to the store","path":"src/main-thread/strings.ts","position":28,"original_position":28,"commit_id":"a41ea6ebc115f57cc0b373d6eda0e13e3cfe5c86","original_commit_id":"a41ea6ebc115f57cc0b373d6eda0e13e3cfe5c86","user":{"login":"kristoferbaxter","id":61764,"node_id":"MDQ6VXNlcjYxNzY0","avatar_url":"https://avatars1.githubusercontent.com/u/61764?v=4","gravatar_id":"","url":"https://api.github.com/users/kristoferbaxter","html_url":"https://github.com/kristoferbaxter","followers_url":"https://api.github.com/users/kristoferbaxter/followers","following_url":"https://api.github.com/users/kristoferbaxter/following{/other_user}","gists_url":"https://api.github.com/users/kristoferbaxter/gists{/gist_id}","starred_url":"https://api.github.com/users/kristoferbaxter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristoferbaxter/subscriptions","organizations_url":"https://api.github.com/users/kristoferbaxter/orgs","repos_url":"https://api.github.com/users/kristoferbaxter/repos","events_url":"https://api.github.com/users/kristoferbaxter/events{/privacy}","received_events_url":"https://api.github.com/users/kristoferbaxter/received_events","type":"User","site_admin":false},"body":"Also, we can likely return `void`.","created_at":"2018-10-31T00:00:40Z","updated_at":"2018-10-31T00:00:40Z","html_url":"https://github.com/ampproject/worker-dom/pull/135#discussion_r229527764","pull_request_url":"https://api.github.com/repos/ampproject/worker-dom/pulls/135","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ampproject/worker-dom/pulls/comments/229527764"},"html":{"href":"https://github.com/ampproject/worker-dom/pull/135#discussion_r229527764"},"pull_request":{"href":"https://api.github.com/repos/ampproject/worker-dom/pulls/135"}},"in_reply_to_id":229527557},"pull_request":{"url":"https://api.github.com/repos/ampproject/worker-dom/pulls/135","id":227072196,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3MDcyMTk2","html_url":"https://github.com/ampproject/worker-dom/pull/135","diff_url":"https://github.com/ampproject/worker-dom/pull/135.diff","patch_url":"https://github.com/ampproject/worker-dom/pull/135.patch","issue_url":"https://api.github.com/repos/ampproject/worker-dom/issues/135","number":135,"state":"open","locked":false,"title":"Inverted hydration","user":{"login":"kristoferbaxter","id":61764,"node_id":"MDQ6VXNlcjYxNzY0","avatar_url":"https://avatars1.githubusercontent.com/u/61764?v=4","gravatar_id":"","url":"https://api.github.com/users/kristoferbaxter","html_url":"https://github.com/kristoferbaxter","followers_url":"https://api.github.com/users/kristoferbaxter/followers","following_url":"https://api.github.com/users/kristoferbaxter/following{/other_user}","gists_url":"https://api.github.com/users/kristoferbaxter/gists{/gist_id}","starred_url":"https://api.github.com/users/kristoferbaxter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristoferbaxter/subscriptions","organizations_url":"https://api.github.com/users/kristoferbaxter/orgs","repos_url":"https://api.github.com/users/kristoferbaxter/repos","events_url":"https://api.github.com/users/kristoferbaxter/events{/privacy}","received_events_url":"https://api.github.com/users/kristoferbaxter/received_events","type":"User","site_admin":false},"body":"Invert hydration from worker -> main thread.\r\n\r\nInstead populate the default worker dom with the contents of the dom in the main thread. ","created_at":"2018-10-30T20:35:11Z","updated_at":"2018-10-31T00:00:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ampproject/worker-dom/pulls/135/commits","review_comments_url":"https://api.github.com/repos/ampproject/worker-dom/pulls/135/comments","review_comment_url":"https://api.github.com/repos/ampproject/worker-dom/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ampproject/worker-dom/issues/135/comments","statuses_url":"https://api.github.com/repos/ampproject/worker-dom/statuses/a41ea6ebc115f57cc0b373d6eda0e13e3cfe5c86","head":{"label":"ampproject:inverted-hydration","ref":"inverted-hydration","sha":"a41ea6ebc115f57cc0b373d6eda0e13e3cfe5c86","user":{"login":"ampproject","id":14114390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTE0Mzkw","avatar_url":"https://avatars3.githubusercontent.com/u/14114390?v=4","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"repo":{"id":145039143,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUwMzkxNDM=","name":"worker-dom","full_name":"ampproject/worker-dom","private":false,"owner":{"login":"ampproject","id":14114390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTE0Mzkw","avatar_url":"https://avatars3.githubusercontent.com/u/14114390?v=4","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ampproject/worker-dom","description":"The same DOM API and Frameworks you know, but in a Web Worker.","fork":false,"url":"https://api.github.com/repos/ampproject/worker-dom","forks_url":"https://api.github.com/repos/ampproject/worker-dom/forks","keys_url":"https://api.github.com/repos/ampproject/worker-dom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ampproject/worker-dom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ampproject/worker-dom/teams","hooks_url":"https://api.github.com/repos/ampproject/worker-dom/hooks","issue_events_url":"https://api.github.com/repos/ampproject/worker-dom/issues/events{/number}","events_url":"https://api.github.com/repos/ampproject/worker-dom/events","assignees_url":"https://api.github.com/repos/ampproject/worker-dom/assignees{/user}","branches_url":"https://api.github.com/repos/ampproject/worker-dom/branches{/branch}","tags_url":"https://api.github.com/repos/ampproject/worker-dom/tags","blobs_url":"https://api.github.com/repos/ampproject/worker-dom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ampproject/worker-dom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ampproject/worker-dom/git/refs{/sha}","trees_url":"https://api.github.com/repos/ampproject/worker-dom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ampproject/worker-dom/statuses/{sha}","languages_url":"https://api.github.com/repos/ampproject/worker-dom/languages","stargazers_url":"https://api.github.com/repos/ampproject/worker-dom/stargazers","contributors_url":"https://api.github.com/repos/ampproject/worker-dom/contributors","subscribers_url":"https://api.github.com/repos/ampproject/worker-dom/subscribers","subscription_url":"https://api.github.com/repos/ampproject/worker-dom/subscription","commits_url":"https://api.github.com/repos/ampproject/worker-dom/commits{/sha}","git_commits_url":"https://api.github.com/repos/ampproject/worker-dom/git/commits{/sha}","comments_url":"https://api.github.com/repos/ampproject/worker-dom/comments{/number}","issue_comment_url":"https://api.github.com/repos/ampproject/worker-dom/issues/comments{/number}","contents_url":"https://api.github.com/repos/ampproject/worker-dom/contents/{+path}","compare_url":"https://api.github.com/repos/ampproject/worker-dom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ampproject/worker-dom/merges","archive_url":"https://api.github.com/repos/ampproject/worker-dom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ampproject/worker-dom/downloads","issues_url":"https://api.github.com/repos/ampproject/worker-dom/issues{/number}","pulls_url":"https://api.github.com/repos/ampproject/worker-dom/pulls{/number}","milestones_url":"https://api.github.com/repos/ampproject/worker-dom/milestones{/number}","notifications_url":"https://api.github.com/repos/ampproject/worker-dom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ampproject/worker-dom/labels{/name}","releases_url":"https://api.github.com/repos/ampproject/worker-dom/releases{/id}","deployments_url":"https://api.github.com/repos/ampproject/worker-dom/deployments","created_at":"2018-08-16T21:06:04Z","updated_at":"2018-10-30T23:15:15Z","pushed_at":"2018-10-30T22:34:56Z","git_url":"git://github.com/ampproject/worker-dom.git","ssh_url":"git@github.com:ampproject/worker-dom.git","clone_url":"https://github.com/ampproject/worker-dom.git","svn_url":"https://github.com/ampproject/worker-dom","homepage":"","size":941,"stargazers_count":1603,"watchers_count":1603,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"archived":false,"open_issues_count":28,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":45,"open_issues":28,"watchers":1603,"default_branch":"master"}},"base":{"label":"ampproject:master","ref":"master","sha":"a00b943ab43f40453c714d2a0abaca360023eee0","user":{"login":"ampproject","id":14114390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTE0Mzkw","avatar_url":"https://avatars3.githubusercontent.com/u/14114390?v=4","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"repo":{"id":145039143,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUwMzkxNDM=","name":"worker-dom","full_name":"ampproject/worker-dom","private":false,"owner":{"login":"ampproject","id":14114390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTE0Mzkw","avatar_url":"https://avatars3.githubusercontent.com/u/14114390?v=4","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ampproject/worker-dom","description":"The same DOM API and Frameworks you know, but in a Web Worker.","fork":false,"url":"https://api.github.com/repos/ampproject/worker-dom","forks_url":"https://api.github.com/repos/ampproject/worker-dom/forks","keys_url":"https://api.github.com/repos/ampproject/worker-dom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ampproject/worker-dom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ampproject/worker-dom/teams","hooks_url":"https://api.github.com/repos/ampproject/worker-dom/hooks","issue_events_url":"https://api.github.com/repos/ampproject/worker-dom/issues/events{/number}","events_url":"https://api.github.com/repos/ampproject/worker-dom/events","assignees_url":"https://api.github.com/repos/ampproject/worker-dom/assignees{/user}","branches_url":"https://api.github.com/repos/ampproject/worker-dom/branches{/branch}","tags_url":"https://api.github.com/repos/ampproject/worker-dom/tags","blobs_url":"https://api.github.com/repos/ampproject/worker-dom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ampproject/worker-dom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ampproject/worker-dom/git/refs{/sha}","trees_url":"https://api.github.com/repos/ampproject/worker-dom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ampproject/worker-dom/statuses/{sha}","languages_url":"https://api.github.com/repos/ampproject/worker-dom/languages","stargazers_url":"https://api.github.com/repos/ampproject/worker-dom/stargazers","contributors_url":"https://api.github.com/repos/ampproject/worker-dom/contributors","subscribers_url":"https://api.github.com/repos/ampproject/worker-dom/subscribers","subscription_url":"https://api.github.com/repos/ampproject/worker-dom/subscription","commits_url":"https://api.github.com/repos/ampproject/worker-dom/commits{/sha}","git_commits_url":"https://api.github.com/repos/ampproject/worker-dom/git/commits{/sha}","comments_url":"https://api.github.com/repos/ampproject/worker-dom/comments{/number}","issue_comment_url":"https://api.github.com/repos/ampproject/worker-dom/issues/comments{/number}","contents_url":"https://api.github.com/repos/ampproject/worker-dom/contents/{+path}","compare_url":"https://api.github.com/repos/ampproject/worker-dom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ampproject/worker-dom/merges","archive_url":"https://api.github.com/repos/ampproject/worker-dom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ampproject/worker-dom/downloads","issues_url":"https://api.github.com/repos/ampproject/worker-dom/issues{/number}","pulls_url":"https://api.github.com/repos/ampproject/worker-dom/pulls{/number}","milestones_url":"https://api.github.com/repos/ampproject/worker-dom/milestones{/number}","notifications_url":"https://api.github.com/repos/ampproject/worker-dom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ampproject/worker-dom/labels{/name}","releases_url":"https://api.github.com/repos/ampproject/worker-dom/releases{/id}","deployments_url":"https://api.github.com/repos/ampproject/worker-dom/deployments","created_at":"2018-08-16T21:06:04Z","updated_at":"2018-10-30T23:15:15Z","pushed_at":"2018-10-30T22:34:56Z","git_url":"git://github.com/ampproject/worker-dom.git","ssh_url":"git@github.com:ampproject/worker-dom.git","clone_url":"https://github.com/ampproject/worker-dom.git","svn_url":"https://github.com/ampproject/worker-dom","homepage":"","size":941,"stargazers_count":1603,"watchers_count":1603,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"archived":false,"open_issues_count":28,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":45,"open_issues":28,"watchers":1603,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ampproject/worker-dom/pulls/135"},"html":{"href":"https://github.com/ampproject/worker-dom/pull/135"},"issue":{"href":"https://api.github.com/repos/ampproject/worker-dom/issues/135"},"comments":{"href":"https://api.github.com/repos/ampproject/worker-dom/issues/135/comments"},"review_comments":{"href":"https://api.github.com/repos/ampproject/worker-dom/pulls/135/comments"},"review_comment":{"href":"https://api.github.com/repos/ampproject/worker-dom/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ampproject/worker-dom/pulls/135/commits"},"statuses":{"href":"https://api.github.com/repos/ampproject/worker-dom/statuses/a41ea6ebc115f57cc0b373d6eda0e13e3cfe5c86"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"kristoferbaxter"}}