Skip to content

Instantly share code, notes, and snippets.

jocki84 /
Last active Mar 2, 2021 — forked from hsablonniere/
scrollIntoViewIfNeeded 4 everyone!!!

Polyfill for scrollIntoViewIfNeeded()

This gist provides polyfill code for the [scrollIntoViewIfNeeded()][SIVIN] Element method found on WebKit browsers.


There is no particular requirement on the position in the hierarchy of the