Javascript Element scrollTo compatibility difference between caniuse and mozilla

140 views Asked by At

I am looking for browser support information of Element.scrollTo method. However, there is difference in results from caniuse and mozilla for the latest safari(iOS) and Edge.

From mozilla, it says these browsers do not support this method. But caniuse says they do support.

mozilla

caniuse

When I tested with iPhone X, iOS 13.3.1, the method worked perfectly, which means that mozilla is wrong.

So far, I have trusted mozilla for the compatibility check purpose because this website is more descriptive on (other) technical information (thus, more reliable?).

In a long term, should I rely on caniuse, rather than mozilla?

2

There are 2 answers

0
Sang On BEST ANSWER

Reply from Alexis @ caniuse team

In this case the information at https://caniuse.com/#feat=element-scroll-methods is correct regarding iOS support. I've submitted feedback on the MDN support table. For future reference you can do so too using the "What are we missing" button at https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTo#Browser_Compatibility

2
as-if-i-code On

If you search specific scrollTo keyword(not just scroll) on caniuse, you will get almost identicle results as Mozilla.

But interesting fact is, data on caniuse, is powered by Mozilla's MDN browser-compat-data(refer Notes tab at the bottom on caniuse) and going forward, this collaboration with MDN is going to improve. So in a long term, referring to either caniuse or mozilla, is going to be the same. But I personally prefer MDN because of its clutter-free simple portal with additional(essential) details.

Here is an article about caniuse-MDN collaboration.