Range: compareBoundaryPoints() method examples and explanation unclear #732
-
Article: https://developer.mozilla.org/en-US/docs/Web/API/Range/compareBoundaryPoints While in the list of
This is misleading. It seems as though it's saying the result will be source compared to arg. Which is not correct. I'd recommend that section should be rewritten to be clearer. (It's a shame the enum names are so confusing, but probably not much anyone can do about it now.) Here's an example of how it could be rewritten:
The return value puts things in a different order:
This, though technically accurate, is just plain hard to get your head around. As discussed, clearer writing of the Here's a possible different example that could be used:
(A little harder to read on this site than it would be on MDN.) Or some graphics could be made that are even easier to understand and just as clear. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Answered here: https://github.com/orgs/mdn/discussions/733#discussioncomment-10603197 |
Beta Was this translation helpful? Give feedback.
Answered here: https://github.com/orgs/mdn/discussions/733#discussioncomment-10603197