blago
2015-06-30
Currently ScrollLogicalPosition
enumearation accepts 2 values: "start"
& "end"
enum ScrollLogicalPosition { "start", "end" };
It seems good to me to add "center"
value also, so that content can be centered in the viewport or inside scrolling box ?
This can be done with non-standard scrollIntoViewIfNeeded(true)
but this option with passing objects is much cleaner to me.
Example:
document.body.children[19].scrollIntoView({
behavior: "smooth",
block: "center"
});
Firefox supports this but only with "start"
& "end"
values.