{"action":"created","comment":{"url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/pulls/comments/93468311","pull_request_review_id":13996652,"id":93468311,"diff_hunk":"@@ -131,6 +131,29 @@ describe('textPosition', () => {\n       ].join('')\n       assert.equal(text, expected)\n     })\n+\n+    it('can describe a range starting at an empty element', () => {","path":"test/index_spec.js","position":5,"original_position":5,"commit_id":"703ce454ebdacbf7e499b2bb8a1b8931e1457314","original_commit_id":"703ce454ebdacbf7e499b2bb8a1b8931e1457314","user":{"login":"robertknight","id":2458,"avatar_url":"https://avatars.githubusercontent.com/u/2458?v=3","gravatar_id":"","url":"https://api.github.com/users/robertknight","html_url":"https://github.com/robertknight","followers_url":"https://api.github.com/users/robertknight/followers","following_url":"https://api.github.com/users/robertknight/following{/other_user}","gists_url":"https://api.github.com/users/robertknight/gists{/gist_id}","starred_url":"https://api.github.com/users/robertknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertknight/subscriptions","organizations_url":"https://api.github.com/users/robertknight/orgs","repos_url":"https://api.github.com/users/robertknight/repos","events_url":"https://api.github.com/users/robertknight/events{/privacy}","received_events_url":"https://api.github.com/users/robertknight/received_events","type":"User","site_admin":false},"body":"These are a couple of extra tests suggested both by the coverage report and the anchoring tests in the Hypothesis client.","created_at":"2016-12-21T16:13:57Z","updated_at":"2016-12-21T16:13:57Z","html_url":"https://github.com/tilgovi/dom-anchor-text-position/pull/5#discussion_r93468311","pull_request_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/pulls/comments/93468311"},"html":{"href":"https://github.com/tilgovi/dom-anchor-text-position/pull/5#discussion_r93468311"},"pull_request":{"href":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/pulls/5","id":98960376,"html_url":"https://github.com/tilgovi/dom-anchor-text-position/pull/5","diff_url":"https://github.com/tilgovi/dom-anchor-text-position/pull/5.diff","patch_url":"https://github.com/tilgovi/dom-anchor-text-position/pull/5.patch","issue_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/issues/5","number":5,"state":"open","locked":false,"title":"Work around bugs in IE and Edge's Range.toString() implementation","user":{"login":"robertknight","id":2458,"avatar_url":"https://avatars.githubusercontent.com/u/2458?v=3","gravatar_id":"","url":"https://api.github.com/users/robertknight","html_url":"https://github.com/robertknight","followers_url":"https://api.github.com/users/robertknight/followers","following_url":"https://api.github.com/users/robertknight/following{/other_user}","gists_url":"https://api.github.com/users/robertknight/gists{/gist_id}","starred_url":"https://api.github.com/users/robertknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertknight/subscriptions","organizations_url":"https://api.github.com/users/robertknight/orgs","repos_url":"https://api.github.com/users/robertknight/repos","events_url":"https://api.github.com/users/robertknight/events{/privacy}","received_events_url":"https://api.github.com/users/robertknight/received_events","type":"User","site_admin":false},"body":"Work around the issues with IE and Blink's implementation of Range.toString() described in https://github.com/tilgovi/dom-anchor-text-position/issues/4\r\n\r\nThe workaround uses a ponyfill for Range.toString() based on a fairly\r\ndirect translation of Blink's [Range::toString()](https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/dom/Range.cpp?q=range::tostring&sq=package:chromium&l=933) logic.\r\n\r\nTested with the existing tests for this package, plus those from the Hypothesis client. I also compared the output of the native implementation of Range.toString() and the ponyfill on the HTML single-page spec.\r\n\r\nThe native implementation of Range.toString() is several times faster (60-120ms on https://html.spec.whatwg.org/ vs. ~400ms for the ponyfill), so if we're happy with the approach here, I can follow it up with logic to use the native version if it doesn't have the bugs that IE/Edge's one has.\r\n\r\nFixes #4 ","created_at":"2016-12-21T16:13:01Z","updated_at":"2016-12-21T16:13:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"87bfb79bcbaaa20bf8075a3952e4b38c86f201cd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/pulls/5/commits","review_comments_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/pulls/5/comments","review_comment_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/issues/5/comments","statuses_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/statuses/703ce454ebdacbf7e499b2bb8a1b8931e1457314","head":{"label":"robertknight:work-around-ie-edge-range-to-string","ref":"work-around-ie-edge-range-to-string","sha":"703ce454ebdacbf7e499b2bb8a1b8931e1457314","user":{"login":"robertknight","id":2458,"avatar_url":"https://avatars.githubusercontent.com/u/2458?v=3","gravatar_id":"","url":"https://api.github.com/users/robertknight","html_url":"https://github.com/robertknight","followers_url":"https://api.github.com/users/robertknight/followers","following_url":"https://api.github.com/users/robertknight/following{/other_user}","gists_url":"https://api.github.com/users/robertknight/gists{/gist_id}","starred_url":"https://api.github.com/users/robertknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertknight/subscriptions","organizations_url":"https://api.github.com/users/robertknight/orgs","repos_url":"https://api.github.com/users/robertknight/repos","events_url":"https://api.github.com/users/robertknight/events{/privacy}","received_events_url":"https://api.github.com/users/robertknight/received_events","type":"User","site_admin":false},"repo":{"id":77065519,"name":"dom-anchor-text-position","full_name":"robertknight/dom-anchor-text-position","owner":{"login":"robertknight","id":2458,"avatar_url":"https://avatars.githubusercontent.com/u/2458?v=3","gravatar_id":"","url":"https://api.github.com/users/robertknight","html_url":"https://github.com/robertknight","followers_url":"https://api.github.com/users/robertknight/followers","following_url":"https://api.github.com/users/robertknight/following{/other_user}","gists_url":"https://api.github.com/users/robertknight/gists{/gist_id}","starred_url":"https://api.github.com/users/robertknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertknight/subscriptions","organizations_url":"https://api.github.com/users/robertknight/orgs","repos_url":"https://api.github.com/users/robertknight/repos","events_url":"https://api.github.com/users/robertknight/events{/privacy}","received_events_url":"https://api.github.com/users/robertknight/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/robertknight/dom-anchor-text-position","description":"Convert between DOM Range instances and text positions.","fork":true,"url":"https://api.github.com/repos/robertknight/dom-anchor-text-position","forks_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/forks","keys_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/teams","hooks_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/hooks","issue_events_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/issues/events{/number}","events_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/events","assignees_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/assignees{/user}","branches_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/branches{/branch}","tags_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/tags","blobs_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/git/refs{/sha}","trees_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/statuses/{sha}","languages_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/languages","stargazers_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/stargazers","contributors_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/contributors","subscribers_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/subscribers","subscription_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/subscription","commits_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/commits{/sha}","git_commits_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/git/commits{/sha}","comments_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/comments{/number}","issue_comment_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/issues/comments{/number}","contents_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/contents/{+path}","compare_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/merges","archive_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/downloads","issues_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/issues{/number}","pulls_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/pulls{/number}","milestones_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/milestones{/number}","notifications_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/labels{/name}","releases_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/releases{/id}","deployments_url":"https://api.github.com/repos/robertknight/dom-anchor-text-position/deployments","created_at":"2016-12-21T15:56:41Z","updated_at":"2016-12-21T15:56:43Z","pushed_at":"2016-12-21T16:01:47Z","git_url":"git://github.com/robertknight/dom-anchor-text-position.git","ssh_url":"git@github.com:robertknight/dom-anchor-text-position.git","clone_url":"https://github.com/robertknight/dom-anchor-text-position.git","svn_url":"https://github.com/robertknight/dom-anchor-text-position","homepage":"","size":74,"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":"tilgovi:master","ref":"master","sha":"0cb5a5c3b54ec7f9caae92cbc3623938001cdea5","user":{"login":"tilgovi","id":20818,"avatar_url":"https://avatars.githubusercontent.com/u/20818?v=3","gravatar_id":"","url":"https://api.github.com/users/tilgovi","html_url":"https://github.com/tilgovi","followers_url":"https://api.github.com/users/tilgovi/followers","following_url":"https://api.github.com/users/tilgovi/following{/other_user}","gists_url":"https://api.github.com/users/tilgovi/gists{/gist_id}","starred_url":"https://api.github.com/users/tilgovi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tilgovi/subscriptions","organizations_url":"https://api.github.com/users/tilgovi/orgs","repos_url":"https://api.github.com/users/tilgovi/repos","events_url":"https://api.github.com/users/tilgovi/events{/privacy}","received_events_url":"https://api.github.com/users/tilgovi/received_events","type":"User","site_admin":false},"repo":{"id":21282585,"name":"dom-anchor-text-position","full_name":"tilgovi/dom-anchor-text-position","owner":{"login":"tilgovi","id":20818,"avatar_url":"https://avatars.githubusercontent.com/u/20818?v=3","gravatar_id":"","url":"https://api.github.com/users/tilgovi","html_url":"https://github.com/tilgovi","followers_url":"https://api.github.com/users/tilgovi/followers","following_url":"https://api.github.com/users/tilgovi/following{/other_user}","gists_url":"https://api.github.com/users/tilgovi/gists{/gist_id}","starred_url":"https://api.github.com/users/tilgovi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tilgovi/subscriptions","organizations_url":"https://api.github.com/users/tilgovi/orgs","repos_url":"https://api.github.com/users/tilgovi/repos","events_url":"https://api.github.com/users/tilgovi/events{/privacy}","received_events_url":"https://api.github.com/users/tilgovi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tilgovi/dom-anchor-text-position","description":"Convert between DOM Range instances and text positions.","fork":false,"url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position","forks_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/forks","keys_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/teams","hooks_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/hooks","issue_events_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/issues/events{/number}","events_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/events","assignees_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/assignees{/user}","branches_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/branches{/branch}","tags_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/tags","blobs_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/git/refs{/sha}","trees_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/statuses/{sha}","languages_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/languages","stargazers_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/stargazers","contributors_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/contributors","subscribers_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/subscribers","subscription_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/subscription","commits_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/commits{/sha}","git_commits_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/git/commits{/sha}","comments_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/comments{/number}","issue_comment_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/issues/comments{/number}","contents_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/contents/{+path}","compare_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/merges","archive_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/downloads","issues_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/issues{/number}","pulls_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/pulls{/number}","milestones_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/milestones{/number}","notifications_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/labels{/name}","releases_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/releases{/id}","deployments_url":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/deployments","created_at":"2014-06-27T16:52:35Z","updated_at":"2016-08-22T18:47:54Z","pushed_at":"2016-12-21T16:13:02Z","git_url":"git://github.com/tilgovi/dom-anchor-text-position.git","ssh_url":"git@github.com:tilgovi/dom-anchor-text-position.git","clone_url":"https://github.com/tilgovi/dom-anchor-text-position.git","svn_url":"https://github.com/tilgovi/dom-anchor-text-position","homepage":"","size":74,"stargazers_count":9,"watchers_count":9,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/pulls/5"},"html":{"href":"https://github.com/tilgovi/dom-anchor-text-position/pull/5"},"issue":{"href":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/issues/5"},"comments":{"href":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/tilgovi/dom-anchor-text-position/statuses/703ce454ebdacbf7e499b2bb8a1b8931e1457314"}}}}
{"actor":{"display_login":"robertknight"}}