New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IE8: selection methods not available. #4
Comments
… that if possible. per openannotation#4
@nickstenning @tilgovi What do you think? |
Seems fine to me. |
But lets call the variable something other than win... not sure what... maybe |
That's certainly doable - but it is a replacement for |
Yeah it's not a big deal either way. These functions would typically be
|
I understand the need for a replacement for |
@nickstenning This repo calls out to |
That's maybe a good thing for us to work toward changing.
|
Am I being an idiot? The only reference I see to |
There's also |
So, it doesn't call This repository does however, call |
@nickstenning you clearly understand the problem better than I do, feel free to have at it and I can amend my PR to revert my proposed changes here. |
The `toRange()` method of `NormalizedRange` is the only point of coupling between the DOM implementation of the W3C Range APIs, and the xpath-range library. By inlining the tiny amount of code need to convert a `NormalizedRange` into a DOM Range in the text selector, we can remove this coupling. This was motivated by openannotation/xpath-range#4.
Okay, brilliant. Thank you, @krues8dr, for identifying this coupling. I've submitted #8 here to refactor the test, and have committed openannotation/annotator@e28f193 to remove the need for the |
@nickstenning Great, so that's half of it - but there's still |
There are no uses of |
Great, so I've merged that in to our fork and tests are still working. I'm at a conference atm so I can't dig too much on this right now, but it looks good at first glance. |
It sounds like this was resolved. Please re-open if that isn't so. |
In IE8, things like
document.createRange
andwindow.getSelection
don't exist. Per the discussion over on Annotator openannotation/annotator#412 (comment) we're suggesting users use the Rangy plugin to fill these gaps - but that doesn't polyfillwindow
ordocument
, it just provides a standard interface instead a la jQuery.For instances like this and this I think it would make sense to test if rangy is being used and if not, default to the current methods. E.g.:
Relates to openannotation/annotator#428
The text was updated successfully, but these errors were encountered: