Treora opened a new pull request, #135: URL: https://github.com/apache/incubator-annotator/pull/135
Currently, `highlightText` returns a function that removes the highlight again. In some cases, one may want more possibilities, e.g. attaching a hover event listener to the highlight elements, measuring its location on the page, etc. This change introduces a `TextHighlight` class. Instead of `highlightText(…)` one would write `new TextHighlight(…)`, and the created object has a `remove()` method. That object’s `highlightElements` property gives access to the array of `<mark>` (or whichever) elements that used to be an internal, inaccessible variable. The previous API is kept available for now using a simple wrapper; we could remove it in a new release. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
