Re: [csswg-drafts] [css-nav-1] Improve the name of window.navigate (#3387)

> `directionalNavigate()` or `spatialNavigate()` or similar are also problematic, because this method should be possible to extend to sequential navigation by passing it a "prev" or "next" argument, and that does not work with such names.

Maybe the **spatial navigation starting point** (and/or **sequential focus navigation starting point**) should be exposed as an object that is a subclass of `Range`, that has methods to navigate like `prev()` `next()` `up()` `right()` etc. And then you can get the current spatial navigation starting point with an attribute on `window` (if that is the appropriate place to put it?).

```
spatialNavigationStartingPoing.up();
sequentialFocusStartingPoint.next();
// or same object for both?
```

I don't know if there are use cases for getting the `Range` without invoking the other methods, though.

-- 
GitHub Notification of comment by zcorpan
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3387#issuecomment-489134617 using your GitHub account

Received on Friday, 3 May 2019 15:25:45 UTC