Closed 2Paradise closed 2 years ago
https://developer.mozilla.org/ko/docs/Web/API/History/scrollRestoration
window.history.scrollRestoration = 'manual';
It seems to be an incorrect binding to scroll Restoration. This requires a string as an argument, not a boulen.
WebapiDomHistroy.res
[@bs.set] external setScrollRestoration : (t, bool) => unit = "scrollRestoration"; /* experimental */
=>
[@bs.set] external setScrollRestoration : (t, string) => unit = "scrollRestoration"; /* experimental */
Oh good catch. I wonder if the API changed before it was finalised.
Rather than string, we can make it a polymorphic variant so it only accepts the two valid strings auto and manual.
auto
manual
Released as 0.5.0
https://developer.mozilla.org/ko/docs/Web/API/History/scrollRestoration
It seems to be an incorrect binding to scroll Restoration. This requires a string as an argument, not a boulen.
WebapiDomHistroy.res
=>