{"action":"created","comment":{"url":"https://api.github.com/repos/atlassian/prosemirror/pulls/comments/75816805","id":75816805,"diff_hunk":"@@ -156,11 +156,22 @@ class ProseMirror {\n       domDrop: new DOMSubscription\n     }\n \n-    if (opts.place && opts.place.appendChild)\n+    if (opts.place && opts.place.appendChild) {\n+      this.root = opts.place\n+\n+      // loop if root is not document (in light dom)\n+      // only shadowRoot has property (in shadow dom)\n+      while (this.root!== document && !this.root.host) {","path":"src/edit/main.js","position":10,"original_position":10,"commit_id":"6ec3d5d8ce2db703b05c87a6c4601d217440b67e","original_commit_id":"6ec3d5d8ce2db703b05c87a6c4601d217440b67e","user":{"login":"bradleyayers","id":105820,"avatar_url":"https://avatars.githubusercontent.com/u/105820?v=3","gravatar_id":"","url":"https://api.github.com/users/bradleyayers","html_url":"https://github.com/bradleyayers","followers_url":"https://api.github.com/users/bradleyayers/followers","following_url":"https://api.github.com/users/bradleyayers/following{/other_user}","gists_url":"https://api.github.com/users/bradleyayers/gists{/gist_id}","starred_url":"https://api.github.com/users/bradleyayers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradleyayers/subscriptions","organizations_url":"https://api.github.com/users/bradleyayers/orgs","repos_url":"https://api.github.com/users/bradleyayers/repos","events_url":"https://api.github.com/users/bradleyayers/events{/privacy}","received_events_url":"https://api.github.com/users/bradleyayers/received_events","type":"User","site_admin":false},"body":"> `this.root!==`\r\n\r\nMissing a space.","created_at":"2016-08-23T07:51:59Z","updated_at":"2016-08-23T07:51:59Z","html_url":"https://github.com/atlassian/prosemirror/pull/2#discussion_r75816805","pull_request_url":"https://api.github.com/repos/atlassian/prosemirror/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/atlassian/prosemirror/pulls/comments/75816805"},"html":{"href":"https://github.com/atlassian/prosemirror/pull/2#discussion_r75816805"},"pull_request":{"href":"https://api.github.com/repos/atlassian/prosemirror/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/atlassian/prosemirror/pulls/2","id":82287035,"html_url":"https://github.com/atlassian/prosemirror/pull/2","diff_url":"https://github.com/atlassian/prosemirror/pull/2.diff","patch_url":"https://github.com/atlassian/prosemirror/pull/2.patch","issue_url":"https://api.github.com/repos/atlassian/prosemirror/issues/2","number":2,"state":"open","locked":false,"title":"make prosemirror work in shadow dom","user":{"login":"stevemao","id":6316590,"avatar_url":"https://avatars.githubusercontent.com/u/6316590?v=3","gravatar_id":"","url":"https://api.github.com/users/stevemao","html_url":"https://github.com/stevemao","followers_url":"https://api.github.com/users/stevemao/followers","following_url":"https://api.github.com/users/stevemao/following{/other_user}","gists_url":"https://api.github.com/users/stevemao/gists{/gist_id}","starred_url":"https://api.github.com/users/stevemao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevemao/subscriptions","organizations_url":"https://api.github.com/users/stevemao/orgs","repos_url":"https://api.github.com/users/stevemao/repos","events_url":"https://api.github.com/users/stevemao/events{/privacy}","received_events_url":"https://api.github.com/users/stevemao/received_events","type":"User","site_admin":false},"body":"shadowRoot is a DOM Node and it is the standard (https://twitter.com/MaoStevemao/status/767864034049732608). We keep a reference of `root` in prosemirror instance.\r\n\r\nI tried to do a global search in src and compare `document`/`window` with https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot, to see if we could use `pm.root` DOM Node instead. There might be something missing either in the MDN docs or in the source code.","created_at":"2016-08-23T00:46:39Z","updated_at":"2016-08-23T07:52:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3367e9fd08e77772921d3efbb7f3e7849a4ea2d0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/atlassian/prosemirror/pulls/2/commits","review_comments_url":"https://api.github.com/repos/atlassian/prosemirror/pulls/2/comments","review_comment_url":"https://api.github.com/repos/atlassian/prosemirror/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atlassian/prosemirror/issues/2/comments","statuses_url":"https://api.github.com/repos/atlassian/prosemirror/statuses/6ec3d5d8ce2db703b05c87a6c4601d217440b67e","head":{"label":"atlassian:fix-shadow","ref":"fix-shadow","sha":"6ec3d5d8ce2db703b05c87a6c4601d217440b67e","user":{"login":"atlassian","id":168166,"avatar_url":"https://avatars.githubusercontent.com/u/168166?v=3","gravatar_id":"","url":"https://api.github.com/users/atlassian","html_url":"https://github.com/atlassian","followers_url":"https://api.github.com/users/atlassian/followers","following_url":"https://api.github.com/users/atlassian/following{/other_user}","gists_url":"https://api.github.com/users/atlassian/gists{/gist_id}","starred_url":"https://api.github.com/users/atlassian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atlassian/subscriptions","organizations_url":"https://api.github.com/users/atlassian/orgs","repos_url":"https://api.github.com/users/atlassian/repos","events_url":"https://api.github.com/users/atlassian/events{/privacy}","received_events_url":"https://api.github.com/users/atlassian/received_events","type":"Organization","site_admin":false},"repo":{"id":65457422,"name":"prosemirror","full_name":"atlassian/prosemirror","owner":{"login":"atlassian","id":168166,"avatar_url":"https://avatars.githubusercontent.com/u/168166?v=3","gravatar_id":"","url":"https://api.github.com/users/atlassian","html_url":"https://github.com/atlassian","followers_url":"https://api.github.com/users/atlassian/followers","following_url":"https://api.github.com/users/atlassian/following{/other_user}","gists_url":"https://api.github.com/users/atlassian/gists{/gist_id}","starred_url":"https://api.github.com/users/atlassian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atlassian/subscriptions","organizations_url":"https://api.github.com/users/atlassian/orgs","repos_url":"https://api.github.com/users/atlassian/repos","events_url":"https://api.github.com/users/atlassian/events{/privacy}","received_events_url":"https://api.github.com/users/atlassian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atlassian/prosemirror","description":"The ProseMirror WYSIWYM editor","fork":true,"url":"https://api.github.com/repos/atlassian/prosemirror","forks_url":"https://api.github.com/repos/atlassian/prosemirror/forks","keys_url":"https://api.github.com/repos/atlassian/prosemirror/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atlassian/prosemirror/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atlassian/prosemirror/teams","hooks_url":"https://api.github.com/repos/atlassian/prosemirror/hooks","issue_events_url":"https://api.github.com/repos/atlassian/prosemirror/issues/events{/number}","events_url":"https://api.github.com/repos/atlassian/prosemirror/events","assignees_url":"https://api.github.com/repos/atlassian/prosemirror/assignees{/user}","branches_url":"https://api.github.com/repos/atlassian/prosemirror/branches{/branch}","tags_url":"https://api.github.com/repos/atlassian/prosemirror/tags","blobs_url":"https://api.github.com/repos/atlassian/prosemirror/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atlassian/prosemirror/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atlassian/prosemirror/git/refs{/sha}","trees_url":"https://api.github.com/repos/atlassian/prosemirror/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atlassian/prosemirror/statuses/{sha}","languages_url":"https://api.github.com/repos/atlassian/prosemirror/languages","stargazers_url":"https://api.github.com/repos/atlassian/prosemirror/stargazers","contributors_url":"https://api.github.com/repos/atlassian/prosemirror/contributors","subscribers_url":"https://api.github.com/repos/atlassian/prosemirror/subscribers","subscription_url":"https://api.github.com/repos/atlassian/prosemirror/subscription","commits_url":"https://api.github.com/repos/atlassian/prosemirror/commits{/sha}","git_commits_url":"https://api.github.com/repos/atlassian/prosemirror/git/commits{/sha}","comments_url":"https://api.github.com/repos/atlassian/prosemirror/comments{/number}","issue_comment_url":"https://api.github.com/repos/atlassian/prosemirror/issues/comments{/number}","contents_url":"https://api.github.com/repos/atlassian/prosemirror/contents/{+path}","compare_url":"https://api.github.com/repos/atlassian/prosemirror/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atlassian/prosemirror/merges","archive_url":"https://api.github.com/repos/atlassian/prosemirror/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atlassian/prosemirror/downloads","issues_url":"https://api.github.com/repos/atlassian/prosemirror/issues{/number}","pulls_url":"https://api.github.com/repos/atlassian/prosemirror/pulls{/number}","milestones_url":"https://api.github.com/repos/atlassian/prosemirror/milestones{/number}","notifications_url":"https://api.github.com/repos/atlassian/prosemirror/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atlassian/prosemirror/labels{/name}","releases_url":"https://api.github.com/repos/atlassian/prosemirror/releases{/id}","deployments_url":"https://api.github.com/repos/atlassian/prosemirror/deployments","created_at":"2016-08-11T09:34:32Z","updated_at":"2016-08-11T09:34:34Z","pushed_at":"2016-08-23T04:16:47Z","git_url":"git://github.com/atlassian/prosemirror.git","ssh_url":"git@github.com:atlassian/prosemirror.git","clone_url":"https://github.com/atlassian/prosemirror.git","svn_url":"https://github.com/atlassian/prosemirror","homepage":null,"size":3106,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"atlassian:master","ref":"master","sha":"806d13fff031ac90178b8fe92b5ddb731f1007e6","user":{"login":"atlassian","id":168166,"avatar_url":"https://avatars.githubusercontent.com/u/168166?v=3","gravatar_id":"","url":"https://api.github.com/users/atlassian","html_url":"https://github.com/atlassian","followers_url":"https://api.github.com/users/atlassian/followers","following_url":"https://api.github.com/users/atlassian/following{/other_user}","gists_url":"https://api.github.com/users/atlassian/gists{/gist_id}","starred_url":"https://api.github.com/users/atlassian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atlassian/subscriptions","organizations_url":"https://api.github.com/users/atlassian/orgs","repos_url":"https://api.github.com/users/atlassian/repos","events_url":"https://api.github.com/users/atlassian/events{/privacy}","received_events_url":"https://api.github.com/users/atlassian/received_events","type":"Organization","site_admin":false},"repo":{"id":65457422,"name":"prosemirror","full_name":"atlassian/prosemirror","owner":{"login":"atlassian","id":168166,"avatar_url":"https://avatars.githubusercontent.com/u/168166?v=3","gravatar_id":"","url":"https://api.github.com/users/atlassian","html_url":"https://github.com/atlassian","followers_url":"https://api.github.com/users/atlassian/followers","following_url":"https://api.github.com/users/atlassian/following{/other_user}","gists_url":"https://api.github.com/users/atlassian/gists{/gist_id}","starred_url":"https://api.github.com/users/atlassian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atlassian/subscriptions","organizations_url":"https://api.github.com/users/atlassian/orgs","repos_url":"https://api.github.com/users/atlassian/repos","events_url":"https://api.github.com/users/atlassian/events{/privacy}","received_events_url":"https://api.github.com/users/atlassian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atlassian/prosemirror","description":"The ProseMirror WYSIWYM editor","fork":true,"url":"https://api.github.com/repos/atlassian/prosemirror","forks_url":"https://api.github.com/repos/atlassian/prosemirror/forks","keys_url":"https://api.github.com/repos/atlassian/prosemirror/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atlassian/prosemirror/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atlassian/prosemirror/teams","hooks_url":"https://api.github.com/repos/atlassian/prosemirror/hooks","issue_events_url":"https://api.github.com/repos/atlassian/prosemirror/issues/events{/number}","events_url":"https://api.github.com/repos/atlassian/prosemirror/events","assignees_url":"https://api.github.com/repos/atlassian/prosemirror/assignees{/user}","branches_url":"https://api.github.com/repos/atlassian/prosemirror/branches{/branch}","tags_url":"https://api.github.com/repos/atlassian/prosemirror/tags","blobs_url":"https://api.github.com/repos/atlassian/prosemirror/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atlassian/prosemirror/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atlassian/prosemirror/git/refs{/sha}","trees_url":"https://api.github.com/repos/atlassian/prosemirror/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atlassian/prosemirror/statuses/{sha}","languages_url":"https://api.github.com/repos/atlassian/prosemirror/languages","stargazers_url":"https://api.github.com/repos/atlassian/prosemirror/stargazers","contributors_url":"https://api.github.com/repos/atlassian/prosemirror/contributors","subscribers_url":"https://api.github.com/repos/atlassian/prosemirror/subscribers","subscription_url":"https://api.github.com/repos/atlassian/prosemirror/subscription","commits_url":"https://api.github.com/repos/atlassian/prosemirror/commits{/sha}","git_commits_url":"https://api.github.com/repos/atlassian/prosemirror/git/commits{/sha}","comments_url":"https://api.github.com/repos/atlassian/prosemirror/comments{/number}","issue_comment_url":"https://api.github.com/repos/atlassian/prosemirror/issues/comments{/number}","contents_url":"https://api.github.com/repos/atlassian/prosemirror/contents/{+path}","compare_url":"https://api.github.com/repos/atlassian/prosemirror/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atlassian/prosemirror/merges","archive_url":"https://api.github.com/repos/atlassian/prosemirror/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atlassian/prosemirror/downloads","issues_url":"https://api.github.com/repos/atlassian/prosemirror/issues{/number}","pulls_url":"https://api.github.com/repos/atlassian/prosemirror/pulls{/number}","milestones_url":"https://api.github.com/repos/atlassian/prosemirror/milestones{/number}","notifications_url":"https://api.github.com/repos/atlassian/prosemirror/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atlassian/prosemirror/labels{/name}","releases_url":"https://api.github.com/repos/atlassian/prosemirror/releases{/id}","deployments_url":"https://api.github.com/repos/atlassian/prosemirror/deployments","created_at":"2016-08-11T09:34:32Z","updated_at":"2016-08-11T09:34:34Z","pushed_at":"2016-08-23T04:16:47Z","git_url":"git://github.com/atlassian/prosemirror.git","ssh_url":"git@github.com:atlassian/prosemirror.git","clone_url":"https://github.com/atlassian/prosemirror.git","svn_url":"https://github.com/atlassian/prosemirror","homepage":null,"size":3106,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atlassian/prosemirror/pulls/2"},"html":{"href":"https://github.com/atlassian/prosemirror/pull/2"},"issue":{"href":"https://api.github.com/repos/atlassian/prosemirror/issues/2"},"comments":{"href":"https://api.github.com/repos/atlassian/prosemirror/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/atlassian/prosemirror/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/atlassian/prosemirror/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atlassian/prosemirror/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/atlassian/prosemirror/statuses/6ec3d5d8ce2db703b05c87a6c4601d217440b67e"}}}}
{"actor":{"display_login":"bradleyayers"}}