Skip to content

Commit 3ffd047

Browse files
committed
add note about promise return being supported
1 parent b108642 commit 3ffd047

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: active-rfcs/0000-router-scroll-position.md

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ Currently there are two ways of specifying an offset and both use an `x`/`y` coo
5959

6060
# Detailed design
6161

62+
Even though it is not commented anywhere in the RFC, **`scrollBehavior` can still return a Promise of any of the mentioned types**. It is omitted to focus on the shape of the return type instead of it being able to _await_ inside of `scrollBehavior`.
63+
6264
## Deprecating `x` and `y`
6365

6466
This aligns with [`Element.scrollTo`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTo) and makes it more natural passing extra options like [`behavior`](https://developer.mozilla.org/en-US/docs/Web/API/ScrollToOptions/behavior).

0 commit comments

Comments
 (0)