You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@annotator.apache.org by GitBox <gi...@apache.org> on 2020/09/08 16:55:21 UTC

[GitHub] [incubator-annotator] tilgovi commented on a change in pull request #88: Restrict DOM scopes to be instances of Range

tilgovi commented on a change in pull request #88:
URL: https://github.com/apache/incubator-annotator/pull/88#discussion_r485064755



##########
File path: packages/dom/src/text-quote/describe.ts
##########
@@ -21,44 +21,31 @@
 import seek from 'dom-seek';
 import type { TextQuoteSelector } from '@annotator/selector';
 
-import type { DomScope } from '../types';
-import { ownerDocument, rangeFromScope } from '../scope';
-
 export async function describeTextQuote(
   range: Range,
-  scope: DomScope = ownerDocument(range).documentElement,
+  scope: Range = range,

Review comment:
       I changed it so that it took a range, because it simplified things and made this symmetric with the anchoring.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org