wessberg / scroll-behavior-polyfill

A polyfill for the 'scroll-behavior' CSS-property
MIT License
102 stars 17 forks source link

fix: calling scroll methods without window context #13

Open gretzkiy opened 4 years ago

gretzkiy commented 4 years ago

When calling patched scrolling methods without window context scrollTo(0, 0) getScrollBehavior throws an error because inputTarget is undefined.

So the solution is to provide default window context when calling patched methods.