Range: compareBoundaryPoints() method examples and explanation unclear #35829
Labels
Content:WebAPI
Web API docs
help wanted
If you know something about this topic, we would love your help!
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/Range/compareBoundaryPoints
What specific section or headline is this issue about?
No response
What information was incorrect, unhelpful, or incomplete?
In the list of
how
parameter values it speaks in terms 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.)
The return value puts things in a different order:
This, though technically accurate, is just plain hard to get your head around.
The example is just a very general code snippet that does not help the reader understand how the method works.
What did you expect to see?
Here's an example of how the
how
section could be rewritten:Here's a possible different example that could be used. The goal with this version is to visually demonstrate the ranges involved, making it easy to see their relative start and end points, and associate that with how the method functions. Multiple example calls are included with their return values shown and explained. Clearer variable names are used that reflect how the two ranges are referred to in the (updated) text.
It's 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.
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
The text was updated successfully, but these errors were encountered: