{"action":"closed","number":3,"pull_request":{"url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/pulls/3","id":229462365,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NDYyMzY1","html_url":"https://github.com/Georgegriff/query-selector-shadow-dom/pull/3","diff_url":"https://github.com/Georgegriff/query-selector-shadow-dom/pull/3.diff","patch_url":"https://github.com/Georgegriff/query-selector-shadow-dom/pull/3.patch","issue_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/issues/3","number":3,"state":"closed","locked":false,"title":"Host property is not always a ShadowDom host","user":{"login":"jasongardnerlv","id":1305188,"node_id":"MDQ6VXNlcjEzMDUxODg=","avatar_url":"https://avatars0.githubusercontent.com/u/1305188?v=4","gravatar_id":"","url":"https://api.github.com/users/jasongardnerlv","html_url":"https://github.com/jasongardnerlv","followers_url":"https://api.github.com/users/jasongardnerlv/followers","following_url":"https://api.github.com/users/jasongardnerlv/following{/other_user}","gists_url":"https://api.github.com/users/jasongardnerlv/gists{/gist_id}","starred_url":"https://api.github.com/users/jasongardnerlv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasongardnerlv/subscriptions","organizations_url":"https://api.github.com/users/jasongardnerlv/orgs","repos_url":"https://api.github.com/users/jasongardnerlv/repos","events_url":"https://api.github.com/users/jasongardnerlv/events{/privacy}","received_events_url":"https://api.github.com/users/jasongardnerlv/received_events","type":"User","site_admin":false},"body":"Got an issue I ran into that's a bit of an edge case, but wanted to report it.\r\n\r\nSometimes an element has a \"host\" property that isn't a ShadowDom host, and affects the `findParentOrHost()` method.\r\n\r\nGithub is the good example. Hopefully you can follow these repoducible steps:\r\n\r\n1. Navigate to the [main Github page](https://github.com/Georgegriff/query-selector-shadow-dom) for your project.\r\n\r\n1. Up top, where you have the tabs for _Code/Issues/Pull Requests/etc_, inspect the __<>__ icon next to _Code_.\r\n\r\n1. You'll see there's an `svg.octicon` inside a `a.js-selected-navigation-item`. Select the __svg__ in the _Elements_ panel in the devtools.\r\n\r\n1. Go to the devtools console and run `$0.parentNode.host` and you get _\"github.com\"_\r\n\r\nMost of the anchors on the Github pages set the host property to _\"github.com\"_ and it breaks the `findParentOfHost()` method.\r\n\r\nI changed the method to also make sure the parentNode is a __DocumentFragment__ node type, which solved things in my case.","created_at":"2018-11-08T18:17:19Z","updated_at":"2018-11-08T21:15:51Z","closed_at":"2018-11-08T21:15:51Z","merged_at":"2018-11-08T21:15:51Z","merge_commit_sha":"e9dd6d7f74385864ad14cb74e740b2c1ef0a9bad","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/pulls/3/commits","review_comments_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/pulls/3/comments","review_comment_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/issues/3/comments","statuses_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/statuses/2ac60ee3bef29fc283571f3e1ea915991c68fe89","head":{"label":"jasongardnerlv:non-shadowdom-host","ref":"non-shadowdom-host","sha":"2ac60ee3bef29fc283571f3e1ea915991c68fe89","user":{"login":"jasongardnerlv","id":1305188,"node_id":"MDQ6VXNlcjEzMDUxODg=","avatar_url":"https://avatars0.githubusercontent.com/u/1305188?v=4","gravatar_id":"","url":"https://api.github.com/users/jasongardnerlv","html_url":"https://github.com/jasongardnerlv","followers_url":"https://api.github.com/users/jasongardnerlv/followers","following_url":"https://api.github.com/users/jasongardnerlv/following{/other_user}","gists_url":"https://api.github.com/users/jasongardnerlv/gists{/gist_id}","starred_url":"https://api.github.com/users/jasongardnerlv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasongardnerlv/subscriptions","organizations_url":"https://api.github.com/users/jasongardnerlv/orgs","repos_url":"https://api.github.com/users/jasongardnerlv/repos","events_url":"https://api.github.com/users/jasongardnerlv/events{/privacy}","received_events_url":"https://api.github.com/users/jasongardnerlv/received_events","type":"User","site_admin":false},"repo":{"id":156749146,"node_id":"MDEwOlJlcG9zaXRvcnkxNTY3NDkxNDY=","name":"query-selector-shadow-dom","full_name":"jasongardnerlv/query-selector-shadow-dom","private":false,"owner":{"login":"jasongardnerlv","id":1305188,"node_id":"MDQ6VXNlcjEzMDUxODg=","avatar_url":"https://avatars0.githubusercontent.com/u/1305188?v=4","gravatar_id":"","url":"https://api.github.com/users/jasongardnerlv","html_url":"https://github.com/jasongardnerlv","followers_url":"https://api.github.com/users/jasongardnerlv/followers","following_url":"https://api.github.com/users/jasongardnerlv/following{/other_user}","gists_url":"https://api.github.com/users/jasongardnerlv/gists{/gist_id}","starred_url":"https://api.github.com/users/jasongardnerlv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasongardnerlv/subscriptions","organizations_url":"https://api.github.com/users/jasongardnerlv/orgs","repos_url":"https://api.github.com/users/jasongardnerlv/repos","events_url":"https://api.github.com/users/jasongardnerlv/events{/privacy}","received_events_url":"https://api.github.com/users/jasongardnerlv/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jasongardnerlv/query-selector-shadow-dom","description":"querySelector that can pierce Shadow DOM roots without knowing the path through nested shadow roots. Useful for automated testing of Web Components. Production use is not advised, this is for test environments/tools such as Web Driver","fork":true,"url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom","forks_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/forks","keys_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/teams","hooks_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/hooks","issue_events_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/issues/events{/number}","events_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/events","assignees_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/assignees{/user}","branches_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/branches{/branch}","tags_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/tags","blobs_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/git/refs{/sha}","trees_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/statuses/{sha}","languages_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/languages","stargazers_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/stargazers","contributors_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/contributors","subscribers_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/subscribers","subscription_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/subscription","commits_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/commits{/sha}","git_commits_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/git/commits{/sha}","comments_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/comments{/number}","issue_comment_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/issues/comments{/number}","contents_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/contents/{+path}","compare_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/merges","archive_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/downloads","issues_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/issues{/number}","pulls_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/pulls{/number}","milestones_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/milestones{/number}","notifications_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/labels{/name}","releases_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/releases{/id}","deployments_url":"https://api.github.com/repos/jasongardnerlv/query-selector-shadow-dom/deployments","created_at":"2018-11-08T18:12:20Z","updated_at":"2018-11-08T18:12:22Z","pushed_at":"2018-11-08T18:15:36Z","git_url":"git://github.com/jasongardnerlv/query-selector-shadow-dom.git","ssh_url":"git@github.com:jasongardnerlv/query-selector-shadow-dom.git","clone_url":"https://github.com/jasongardnerlv/query-selector-shadow-dom.git","svn_url":"https://github.com/jasongardnerlv/query-selector-shadow-dom","homepage":"","size":139,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Georgegriff:master","ref":"master","sha":"46abe0604645d309eec2d68723bcd9ed3fa5440f","user":{"login":"Georgegriff","id":9056958,"node_id":"MDQ6VXNlcjkwNTY5NTg=","avatar_url":"https://avatars3.githubusercontent.com/u/9056958?v=4","gravatar_id":"","url":"https://api.github.com/users/Georgegriff","html_url":"https://github.com/Georgegriff","followers_url":"https://api.github.com/users/Georgegriff/followers","following_url":"https://api.github.com/users/Georgegriff/following{/other_user}","gists_url":"https://api.github.com/users/Georgegriff/gists{/gist_id}","starred_url":"https://api.github.com/users/Georgegriff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Georgegriff/subscriptions","organizations_url":"https://api.github.com/users/Georgegriff/orgs","repos_url":"https://api.github.com/users/Georgegriff/repos","events_url":"https://api.github.com/users/Georgegriff/events{/privacy}","received_events_url":"https://api.github.com/users/Georgegriff/received_events","type":"User","site_admin":false},"repo":{"id":139362492,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkzNjI0OTI=","name":"query-selector-shadow-dom","full_name":"Georgegriff/query-selector-shadow-dom","private":false,"owner":{"login":"Georgegriff","id":9056958,"node_id":"MDQ6VXNlcjkwNTY5NTg=","avatar_url":"https://avatars3.githubusercontent.com/u/9056958?v=4","gravatar_id":"","url":"https://api.github.com/users/Georgegriff","html_url":"https://github.com/Georgegriff","followers_url":"https://api.github.com/users/Georgegriff/followers","following_url":"https://api.github.com/users/Georgegriff/following{/other_user}","gists_url":"https://api.github.com/users/Georgegriff/gists{/gist_id}","starred_url":"https://api.github.com/users/Georgegriff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Georgegriff/subscriptions","organizations_url":"https://api.github.com/users/Georgegriff/orgs","repos_url":"https://api.github.com/users/Georgegriff/repos","events_url":"https://api.github.com/users/Georgegriff/events{/privacy}","received_events_url":"https://api.github.com/users/Georgegriff/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Georgegriff/query-selector-shadow-dom","description":"querySelector that can pierce Shadow DOM roots without knowing the path through nested shadow roots. Useful for automated testing of Web Components. Production use is not advised, this is for test environments/tools such as Web Driver","fork":false,"url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom","forks_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/forks","keys_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/teams","hooks_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/hooks","issue_events_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/issues/events{/number}","events_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/events","assignees_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/assignees{/user}","branches_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/branches{/branch}","tags_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/tags","blobs_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/git/refs{/sha}","trees_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/statuses/{sha}","languages_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/languages","stargazers_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/stargazers","contributors_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/contributors","subscribers_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/subscribers","subscription_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/subscription","commits_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/commits{/sha}","git_commits_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/git/commits{/sha}","comments_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/comments{/number}","issue_comment_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/issues/comments{/number}","contents_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/contents/{+path}","compare_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/merges","archive_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/downloads","issues_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/issues{/number}","pulls_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/pulls{/number}","milestones_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/milestones{/number}","notifications_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/labels{/name}","releases_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/releases{/id}","deployments_url":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/deployments","created_at":"2018-07-01T21:12:25Z","updated_at":"2018-11-08T21:10:53Z","pushed_at":"2018-11-08T21:15:51Z","git_url":"git://github.com/Georgegriff/query-selector-shadow-dom.git","ssh_url":"git@github.com:Georgegriff/query-selector-shadow-dom.git","clone_url":"https://github.com/Georgegriff/query-selector-shadow-dom.git","svn_url":"https://github.com/Georgegriff/query-selector-shadow-dom","homepage":"","size":139,"stargazers_count":11,"watchers_count":11,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":2,"open_issues":0,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/pulls/3"},"html":{"href":"https://github.com/Georgegriff/query-selector-shadow-dom/pull/3"},"issue":{"href":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/issues/3"},"comments":{"href":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/Georgegriff/query-selector-shadow-dom/statuses/2ac60ee3bef29fc283571f3e1ea915991c68fe89"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"Georgegriff","id":9056958,"node_id":"MDQ6VXNlcjkwNTY5NTg=","avatar_url":"https://avatars3.githubusercontent.com/u/9056958?v=4","gravatar_id":"","url":"https://api.github.com/users/Georgegriff","html_url":"https://github.com/Georgegriff","followers_url":"https://api.github.com/users/Georgegriff/followers","following_url":"https://api.github.com/users/Georgegriff/following{/other_user}","gists_url":"https://api.github.com/users/Georgegriff/gists{/gist_id}","starred_url":"https://api.github.com/users/Georgegriff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Georgegriff/subscriptions","organizations_url":"https://api.github.com/users/Georgegriff/orgs","repos_url":"https://api.github.com/users/Georgegriff/repos","events_url":"https://api.github.com/users/Georgegriff/events{/privacy}","received_events_url":"https://api.github.com/users/Georgegriff/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"Georgegriff"}}