If scrollRight would be something that you would want to use repeatedly, just build it yourself. It's easy to calculate how it should work:
HTML
<div class="container">
<div class="big-element"></div>
</div>
CSS
.container {
border: 1px solid #666;
width: 1000px;
height: 400px;
overflow-x: scroll;
overflow-y: hidden;
}
.big-element {
width: 1500px;
height: 400px;
background: linear-gradient(to right, #AAA, #CCC);
}
JS
const container = document.querySelector('.container');
const bigel = document.querySelector('.big-element');
function scrollRight(value) {
const available = bigel.offsetWidth - container.offsetWidth;
container.scrollLeft = available - value;
}
scrollRight(200);
And here's a pen for you to play with.
PS: if it's something that you really want to use more often, you could even build it into the Element prototype, though some people don't like doing that.
scrollRightis close, but it's actually Element.scrollLeft.