{"action":"created","comment":{"url":"https://api.github.com/repos/l20n/l20n.js/pulls/comments/40358948","id":40358948,"diff_hunk":"@@ -74,20 +73,22 @@ export class View {\n View.prototype.setAttributes = setAttributes;\n View.prototype.getAttributes = getAttributes;\n \n-function onMutations(mutations) {\n-  return this.service.languages.then(\n-    langs => translateMutations(this, langs, mutations));\n+function init(view, client) {\n+  view.observe();\n+  return client.registerView(view, getResourceLinks(view.doc.head)).then(\n+    () => client);\n }\n \n-export function translate(langs) {\n-  return translateDocument.call(this, langs);\n+function onMutations(mutations) {\n+  return this.resolvedLanguages().then(\n+    langs => translateMutations(this, langs, mutations));\n }\n \n-function translateDocument(langs) {\n-  const [view, doc] = [this, this.doc];\n+export function translateDocument(view, langs) {\n+  const doc = view.doc;\n \n   if (langs[0].code === doc.documentElement.getAttribute('lang')) {\n-    return Promise.resolve.then(\n+    return Promise.resolve().then(","path":"src/bindings/html/view.js","position":109,"original_position":109,"commit_id":"00a1e4e7a54cdc25faef66ea531c07ed4a995798","original_commit_id":"00a1e4e7a54cdc25faef66ea531c07ed4a995798","user":{"login":"zbraniecki","id":449986,"avatar_url":"https://avatars.githubusercontent.com/u/449986?v=3","gravatar_id":"","url":"https://api.github.com/users/zbraniecki","html_url":"https://github.com/zbraniecki","followers_url":"https://api.github.com/users/zbraniecki/followers","following_url":"https://api.github.com/users/zbraniecki/following{/other_user}","gists_url":"https://api.github.com/users/zbraniecki/gists{/gist_id}","starred_url":"https://api.github.com/users/zbraniecki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zbraniecki/subscriptions","organizations_url":"https://api.github.com/users/zbraniecki/orgs","repos_url":"https://api.github.com/users/zbraniecki/repos","events_url":"https://api.github.com/users/zbraniecki/events{/privacy}","received_events_url":"https://api.github.com/users/zbraniecki/received_events","type":"User","site_admin":false},"body":"what's this change about? Was that a spelling before?","created_at":"2015-09-24T19:03:52Z","updated_at":"2015-09-24T19:03:52Z","html_url":"https://github.com/l20n/l20n.js/pull/83#discussion_r40358948","pull_request_url":"https://api.github.com/repos/l20n/l20n.js/pulls/83","_links":{"self":{"href":"https://api.github.com/repos/l20n/l20n.js/pulls/comments/40358948"},"html":{"href":"https://github.com/l20n/l20n.js/pull/83#discussion_r40358948"},"pull_request":{"href":"https://api.github.com/repos/l20n/l20n.js/pulls/83"}}},"pull_request":{"url":"https://api.github.com/repos/l20n/l20n.js/pulls/83","id":45726919,"html_url":"https://github.com/l20n/l20n.js/pull/83","diff_url":"https://github.com/l20n/l20n.js/pull/83.diff","patch_url":"https://github.com/l20n/l20n.js/pull/83.patch","issue_url":"https://api.github.com/repos/l20n/l20n.js/issues/83","number":83,"state":"open","locked":false,"title":"Bug 1207120 - Make all public View methods available during DOM loading","user":{"login":"stasm","id":265818,"avatar_url":"https://avatars.githubusercontent.com/u/265818?v=3","gravatar_id":"","url":"https://api.github.com/users/stasm","html_url":"https://github.com/stasm","followers_url":"https://api.github.com/users/stasm/followers","following_url":"https://api.github.com/users/stasm/following{/other_user}","gists_url":"https://api.github.com/users/stasm/gists{/gist_id}","starred_url":"https://api.github.com/users/stasm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stasm/subscriptions","organizations_url":"https://api.github.com/users/stasm/orgs","repos_url":"https://api.github.com/users/stasm/repos","events_url":"https://api.github.com/users/stasm/events{/privacy}","received_events_url":"https://api.github.com/users/stasm/received_events","type":"User","site_admin":false},"body":"https://bugzilla.mozilla.org/show_bug.cgi?id=1207120","created_at":"2015-09-22T22:48:31Z","updated_at":"2015-09-24T19:03:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4c6061d1e78dd3e9c2296ccbe8469e13b0978bb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/l20n/l20n.js/pulls/83/commits","review_comments_url":"https://api.github.com/repos/l20n/l20n.js/pulls/83/comments","review_comment_url":"https://api.github.com/repos/l20n/l20n.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/l20n/l20n.js/issues/83/comments","statuses_url":"https://api.github.com/repos/l20n/l20n.js/statuses/00a1e4e7a54cdc25faef66ea531c07ed4a995798","head":{"label":"stasm:1207120-view.registered","ref":"1207120-view.registered","sha":"00a1e4e7a54cdc25faef66ea531c07ed4a995798","user":{"login":"stasm","id":265818,"avatar_url":"https://avatars.githubusercontent.com/u/265818?v=3","gravatar_id":"","url":"https://api.github.com/users/stasm","html_url":"https://github.com/stasm","followers_url":"https://api.github.com/users/stasm/followers","following_url":"https://api.github.com/users/stasm/following{/other_user}","gists_url":"https://api.github.com/users/stasm/gists{/gist_id}","starred_url":"https://api.github.com/users/stasm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stasm/subscriptions","organizations_url":"https://api.github.com/users/stasm/orgs","repos_url":"https://api.github.com/users/stasm/repos","events_url":"https://api.github.com/users/stasm/events{/privacy}","received_events_url":"https://api.github.com/users/stasm/received_events","type":"User","site_admin":false},"repo":{"id":5383817,"name":"l20n.js","full_name":"stasm/l20n.js","owner":{"login":"stasm","id":265818,"avatar_url":"https://avatars.githubusercontent.com/u/265818?v=3","gravatar_id":"","url":"https://api.github.com/users/stasm","html_url":"https://github.com/stasm","followers_url":"https://api.github.com/users/stasm/followers","following_url":"https://api.github.com/users/stasm/following{/other_user}","gists_url":"https://api.github.com/users/stasm/gists{/gist_id}","starred_url":"https://api.github.com/users/stasm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stasm/subscriptions","organizations_url":"https://api.github.com/users/stasm/orgs","repos_url":"https://api.github.com/users/stasm/repos","events_url":"https://api.github.com/users/stasm/events{/privacy}","received_events_url":"https://api.github.com/users/stasm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stasm/l20n.js","description":"L20n implementation in JavaScript","fork":true,"url":"https://api.github.com/repos/stasm/l20n.js","forks_url":"https://api.github.com/repos/stasm/l20n.js/forks","keys_url":"https://api.github.com/repos/stasm/l20n.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stasm/l20n.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stasm/l20n.js/teams","hooks_url":"https://api.github.com/repos/stasm/l20n.js/hooks","issue_events_url":"https://api.github.com/repos/stasm/l20n.js/issues/events{/number}","events_url":"https://api.github.com/repos/stasm/l20n.js/events","assignees_url":"https://api.github.com/repos/stasm/l20n.js/assignees{/user}","branches_url":"https://api.github.com/repos/stasm/l20n.js/branches{/branch}","tags_url":"https://api.github.com/repos/stasm/l20n.js/tags","blobs_url":"https://api.github.com/repos/stasm/l20n.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stasm/l20n.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stasm/l20n.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/stasm/l20n.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stasm/l20n.js/statuses/{sha}","languages_url":"https://api.github.com/repos/stasm/l20n.js/languages","stargazers_url":"https://api.github.com/repos/stasm/l20n.js/stargazers","contributors_url":"https://api.github.com/repos/stasm/l20n.js/contributors","subscribers_url":"https://api.github.com/repos/stasm/l20n.js/subscribers","subscription_url":"https://api.github.com/repos/stasm/l20n.js/subscription","commits_url":"https://api.github.com/repos/stasm/l20n.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/stasm/l20n.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/stasm/l20n.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/stasm/l20n.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/stasm/l20n.js/contents/{+path}","compare_url":"https://api.github.com/repos/stasm/l20n.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stasm/l20n.js/merges","archive_url":"https://api.github.com/repos/stasm/l20n.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stasm/l20n.js/downloads","issues_url":"https://api.github.com/repos/stasm/l20n.js/issues{/number}","pulls_url":"https://api.github.com/repos/stasm/l20n.js/pulls{/number}","milestones_url":"https://api.github.com/repos/stasm/l20n.js/milestones{/number}","notifications_url":"https://api.github.com/repos/stasm/l20n.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stasm/l20n.js/labels{/name}","releases_url":"https://api.github.com/repos/stasm/l20n.js/releases{/id}","created_at":"2012-08-11T22:02:26Z","updated_at":"2015-04-13T13:36:10Z","pushed_at":"2015-09-24T15:00:18Z","git_url":"git://github.com/stasm/l20n.js.git","ssh_url":"git@github.com:stasm/l20n.js.git","clone_url":"https://github.com/stasm/l20n.js.git","svn_url":"https://github.com/stasm/l20n.js","homepage":null,"size":4320,"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":"l20n:master","ref":"master","sha":"ac2582c3a2e6489857749bdbceba150be7cd21c9","user":{"login":"l20n","id":2127587,"avatar_url":"https://avatars.githubusercontent.com/u/2127587?v=3","gravatar_id":"","url":"https://api.github.com/users/l20n","html_url":"https://github.com/l20n","followers_url":"https://api.github.com/users/l20n/followers","following_url":"https://api.github.com/users/l20n/following{/other_user}","gists_url":"https://api.github.com/users/l20n/gists{/gist_id}","starred_url":"https://api.github.com/users/l20n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/l20n/subscriptions","organizations_url":"https://api.github.com/users/l20n/orgs","repos_url":"https://api.github.com/users/l20n/repos","events_url":"https://api.github.com/users/l20n/events{/privacy}","received_events_url":"https://api.github.com/users/l20n/received_events","type":"Organization","site_admin":false},"repo":{"id":5366673,"name":"l20n.js","full_name":"l20n/l20n.js","owner":{"login":"l20n","id":2127587,"avatar_url":"https://avatars.githubusercontent.com/u/2127587?v=3","gravatar_id":"","url":"https://api.github.com/users/l20n","html_url":"https://github.com/l20n","followers_url":"https://api.github.com/users/l20n/followers","following_url":"https://api.github.com/users/l20n/following{/other_user}","gists_url":"https://api.github.com/users/l20n/gists{/gist_id}","starred_url":"https://api.github.com/users/l20n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/l20n/subscriptions","organizations_url":"https://api.github.com/users/l20n/orgs","repos_url":"https://api.github.com/users/l20n/repos","events_url":"https://api.github.com/users/l20n/events{/privacy}","received_events_url":"https://api.github.com/users/l20n/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/l20n/l20n.js","description":"L20n reinvents software localization. Users should be able to benefit from the entire expressive power of natural languages. L20n keeps simple things simple, and at the same time makes complex things possible.  This is the JavaScript implementation of L20n.","fork":false,"url":"https://api.github.com/repos/l20n/l20n.js","forks_url":"https://api.github.com/repos/l20n/l20n.js/forks","keys_url":"https://api.github.com/repos/l20n/l20n.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/l20n/l20n.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/l20n/l20n.js/teams","hooks_url":"https://api.github.com/repos/l20n/l20n.js/hooks","issue_events_url":"https://api.github.com/repos/l20n/l20n.js/issues/events{/number}","events_url":"https://api.github.com/repos/l20n/l20n.js/events","assignees_url":"https://api.github.com/repos/l20n/l20n.js/assignees{/user}","branches_url":"https://api.github.com/repos/l20n/l20n.js/branches{/branch}","tags_url":"https://api.github.com/repos/l20n/l20n.js/tags","blobs_url":"https://api.github.com/repos/l20n/l20n.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/l20n/l20n.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/l20n/l20n.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/l20n/l20n.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/l20n/l20n.js/statuses/{sha}","languages_url":"https://api.github.com/repos/l20n/l20n.js/languages","stargazers_url":"https://api.github.com/repos/l20n/l20n.js/stargazers","contributors_url":"https://api.github.com/repos/l20n/l20n.js/contributors","subscribers_url":"https://api.github.com/repos/l20n/l20n.js/subscribers","subscription_url":"https://api.github.com/repos/l20n/l20n.js/subscription","commits_url":"https://api.github.com/repos/l20n/l20n.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/l20n/l20n.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/l20n/l20n.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/l20n/l20n.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/l20n/l20n.js/contents/{+path}","compare_url":"https://api.github.com/repos/l20n/l20n.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/l20n/l20n.js/merges","archive_url":"https://api.github.com/repos/l20n/l20n.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/l20n/l20n.js/downloads","issues_url":"https://api.github.com/repos/l20n/l20n.js/issues{/number}","pulls_url":"https://api.github.com/repos/l20n/l20n.js/pulls{/number}","milestones_url":"https://api.github.com/repos/l20n/l20n.js/milestones{/number}","notifications_url":"https://api.github.com/repos/l20n/l20n.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/l20n/l20n.js/labels{/name}","releases_url":"https://api.github.com/repos/l20n/l20n.js/releases{/id}","created_at":"2012-08-10T08:17:42Z","updated_at":"2015-09-24T15:27:55Z","pushed_at":"2015-09-24T15:00:18Z","git_url":"git://github.com/l20n/l20n.js.git","ssh_url":"git@github.com:l20n/l20n.js.git","clone_url":"https://github.com/l20n/l20n.js.git","svn_url":"https://github.com/l20n/l20n.js","homepage":"http://l20n.org","size":5324,"stargazers_count":703,"watchers_count":703,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":8,"forks":37,"open_issues":8,"watchers":703,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/l20n/l20n.js/pulls/83"},"html":{"href":"https://github.com/l20n/l20n.js/pull/83"},"issue":{"href":"https://api.github.com/repos/l20n/l20n.js/issues/83"},"comments":{"href":"https://api.github.com/repos/l20n/l20n.js/issues/83/comments"},"review_comments":{"href":"https://api.github.com/repos/l20n/l20n.js/pulls/83/comments"},"review_comment":{"href":"https://api.github.com/repos/l20n/l20n.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/l20n/l20n.js/pulls/83/commits"},"statuses":{"href":"https://api.github.com/repos/l20n/l20n.js/statuses/00a1e4e7a54cdc25faef66ea531c07ed4a995798"}}}}