{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/pxt/pulls/comments/216499807","pull_request_review_id":153995372,"id":216499807,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjQ5OTgwNw==","diff_hunk":"@@ -245,21 +246,30 @@ namespace pxsim {\n                         this.lock = false;\n                     }\n                 })\n+            });\n         }\n \n-        get handler() {\n-            return this._handler;\n+        get handlers() {\n+            return this._handlers;\n         }\n \n-        set handler(a: RefAction) {\n-            if (this._handler) {\n-                pxtcore.decr(this._handler);\n-            }\n+        addHandler(a: RefAction) {\n+            this._handlers.push(a);\n+            pxtcore.incr(a)\n+        }\n \n-            this._handler = a;\n+        setHandler(a: RefAction) {\n+            this._handlers.forEach(old => pxtcore.decr(old))","path":"pxtsim/runtime.ts","position":52,"original_position":52,"commit_id":"cb1e57d306305824d99874f085bf64facbc3bf06","original_commit_id":"cb1e57d306305824d99874f085bf64facbc3bf06","user":{"login":"mmoskal","id":10673976,"node_id":"MDQ6VXNlcjEwNjczOTc2","avatar_url":"https://avatars1.githubusercontent.com/u/10673976?v=4","gravatar_id":"","url":"https://api.github.com/users/mmoskal","html_url":"https://github.com/mmoskal","followers_url":"https://api.github.com/users/mmoskal/followers","following_url":"https://api.github.com/users/mmoskal/following{/other_user}","gists_url":"https://api.github.com/users/mmoskal/gists{/gist_id}","starred_url":"https://api.github.com/users/mmoskal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmoskal/subscriptions","organizations_url":"https://api.github.com/users/mmoskal/orgs","repos_url":"https://api.github.com/users/mmoskal/repos","events_url":"https://api.github.com/users/mmoskal/events{/privacy}","received_events_url":"https://api.github.com/users/mmoskal/received_events","type":"User","site_admin":false},"body":"Oh, I think I misunderstood.","created_at":"2018-09-10T22:52:42Z","updated_at":"2018-09-10T22:52:42Z","html_url":"https://github.com/Microsoft/pxt/pull/4660#discussion_r216499807","pull_request_url":"https://api.github.com/repos/Microsoft/pxt/pulls/4660","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/pxt/pulls/comments/216499807"},"html":{"href":"https://github.com/Microsoft/pxt/pull/4660#discussion_r216499807"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/pxt/pulls/4660"}},"in_reply_to_id":216495154},"pull_request":{"url":"https://api.github.com/repos/Microsoft/pxt/pulls/4660","id":213997136,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzOTk3MTM2","html_url":"https://github.com/Microsoft/pxt/pull/4660","diff_url":"https://github.com/Microsoft/pxt/pull/4660.diff","patch_url":"https://github.com/Microsoft/pxt/pull/4660.patch","issue_url":"https://api.github.com/repos/Microsoft/pxt/issues/4660","number":4660,"state":"open","locked":false,"title":"Codal listener","user":{"login":"tballmsft","id":10767146,"node_id":"MDQ6VXNlcjEwNzY3MTQ2","avatar_url":"https://avatars3.githubusercontent.com/u/10767146?v=4","gravatar_id":"","url":"https://api.github.com/users/tballmsft","html_url":"https://github.com/tballmsft","followers_url":"https://api.github.com/users/tballmsft/followers","following_url":"https://api.github.com/users/tballmsft/following{/other_user}","gists_url":"https://api.github.com/users/tballmsft/gists{/gist_id}","starred_url":"https://api.github.com/users/tballmsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tballmsft/subscriptions","organizations_url":"https://api.github.com/users/tballmsft/orgs","repos_url":"https://api.github.com/users/tballmsft/repos","events_url":"https://api.github.com/users/tballmsft/events{/privacy}","received_events_url":"https://api.github.com/users/tballmsft/received_events","type":"User","site_admin":false},"body":"Changes to enable multiple background handlers for an event (simulator). Doesn't affect behavior for user handlers (last handler added wins). ","created_at":"2018-09-07T17:49:28Z","updated_at":"2018-09-10T22:52:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8faa21af42d3c8d952b9a3b4f621b6e3e54bf248","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/pxt/pulls/4660/commits","review_comments_url":"https://api.github.com/repos/Microsoft/pxt/pulls/4660/comments","review_comment_url":"https://api.github.com/repos/Microsoft/pxt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/pxt/issues/4660/comments","statuses_url":"https://api.github.com/repos/Microsoft/pxt/statuses/cb1e57d306305824d99874f085bf64facbc3bf06","head":{"label":"Microsoft:codalListener","ref":"codalListener","sha":"cb1e57d306305824d99874f085bf64facbc3bf06","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":50304279,"node_id":"MDEwOlJlcG9zaXRvcnk1MDMwNDI3OQ==","name":"pxt","full_name":"Microsoft/pxt","owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/pxt","description":"Microsoft MakeCode (PXT - Programming eXperience Toolkit)","fork":false,"url":"https://api.github.com/repos/Microsoft/pxt","forks_url":"https://api.github.com/repos/Microsoft/pxt/forks","keys_url":"https://api.github.com/repos/Microsoft/pxt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/pxt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/pxt/teams","hooks_url":"https://api.github.com/repos/Microsoft/pxt/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/pxt/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/pxt/events","assignees_url":"https://api.github.com/repos/Microsoft/pxt/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/pxt/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/pxt/tags","blobs_url":"https://api.github.com/repos/Microsoft/pxt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/pxt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/pxt/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/pxt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/pxt/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/pxt/languages","stargazers_url":"https://api.github.com/repos/Microsoft/pxt/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/pxt/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/pxt/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/pxt/subscription","commits_url":"https://api.github.com/repos/Microsoft/pxt/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/pxt/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/pxt/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/pxt/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/pxt/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/pxt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/pxt/merges","archive_url":"https://api.github.com/repos/Microsoft/pxt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/pxt/downloads","issues_url":"https://api.github.com/repos/Microsoft/pxt/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/pxt/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/pxt/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/pxt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/pxt/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/pxt/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/pxt/deployments","created_at":"2016-01-24T19:35:52Z","updated_at":"2018-09-10T22:15:17Z","pushed_at":"2018-09-10T22:15:17Z","git_url":"git://github.com/Microsoft/pxt.git","ssh_url":"git@github.com:Microsoft/pxt.git","clone_url":"https://github.com/Microsoft/pxt.git","svn_url":"https://github.com/Microsoft/pxt","homepage":"https://makecode.com","size":132237,"stargazers_count":590,"watchers_count":590,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":198,"mirror_url":null,"archived":false,"open_issues_count":88,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":198,"open_issues":88,"watchers":590,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"88e5e7724ddae5260b2c19293ab6a6ce2a839bed","user":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":50304279,"node_id":"MDEwOlJlcG9zaXRvcnk1MDMwNDI3OQ==","name":"pxt","full_name":"Microsoft/pxt","owner":{"login":"Microsoft","id":6154722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNTQ3MjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6154722?v=4","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/pxt","description":"Microsoft MakeCode (PXT - Programming eXperience Toolkit)","fork":false,"url":"https://api.github.com/repos/Microsoft/pxt","forks_url":"https://api.github.com/repos/Microsoft/pxt/forks","keys_url":"https://api.github.com/repos/Microsoft/pxt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/pxt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/pxt/teams","hooks_url":"https://api.github.com/repos/Microsoft/pxt/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/pxt/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/pxt/events","assignees_url":"https://api.github.com/repos/Microsoft/pxt/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/pxt/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/pxt/tags","blobs_url":"https://api.github.com/repos/Microsoft/pxt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/pxt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/pxt/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/pxt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/pxt/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/pxt/languages","stargazers_url":"https://api.github.com/repos/Microsoft/pxt/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/pxt/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/pxt/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/pxt/subscription","commits_url":"https://api.github.com/repos/Microsoft/pxt/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/pxt/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/pxt/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/pxt/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/pxt/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/pxt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/pxt/merges","archive_url":"https://api.github.com/repos/Microsoft/pxt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/pxt/downloads","issues_url":"https://api.github.com/repos/Microsoft/pxt/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/pxt/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/pxt/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/pxt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/pxt/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/pxt/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/pxt/deployments","created_at":"2016-01-24T19:35:52Z","updated_at":"2018-09-10T22:15:17Z","pushed_at":"2018-09-10T22:15:17Z","git_url":"git://github.com/Microsoft/pxt.git","ssh_url":"git@github.com:Microsoft/pxt.git","clone_url":"https://github.com/Microsoft/pxt.git","svn_url":"https://github.com/Microsoft/pxt","homepage":"https://makecode.com","size":132237,"stargazers_count":590,"watchers_count":590,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":198,"mirror_url":null,"archived":false,"open_issues_count":88,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":198,"open_issues":88,"watchers":590,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/pxt/pulls/4660"},"html":{"href":"https://github.com/Microsoft/pxt/pull/4660"},"issue":{"href":"https://api.github.com/repos/Microsoft/pxt/issues/4660"},"comments":{"href":"https://api.github.com/repos/Microsoft/pxt/issues/4660/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/pxt/pulls/4660/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/pxt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/pxt/pulls/4660/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/pxt/statuses/cb1e57d306305824d99874f085bf64facbc3bf06"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mmoskal"}}