2 ms·
No, the JavaScript has nothing to do with scrolling. Rather, it checks whether it's inside an iframe, and if so, navigates the top-level window to its own URL.
by ameliaquining 9y ago
No, the JavaScript has nothing to do with scrolling. Rather, it checks whether it's inside an iframe, and if so, navigates the top-level window to its own URL. In other words, it prevents you from embedding the site; if you try, your page will instead redirect to it. However, in the modern era, this kind of measure is neither necessary (because you can block iframing with CSP) nor effective (because the parent page can sandbox the iframe).