Execute JS snippet when page is fully loaded

0
Hello. How to execute code in JS snippet when page is fully load? I tried this but it doesn’t work: mx.addOnLoad(function () { document.onload = function() { console.log("content is loaded") var objDiv = document.getElementsByClassName("mx-scrollcontainer-wrapper")[1]; objDiv.scrollTop = objDiv.scrollHeight; }); Also this one but still no success: mx.addOnLoad(function () { document.addEventListener("DOMContentLoaded", function() { console.log("content is loaded") var objDiv = document.getElementsByClassName("mx-scrollcontainer-wrapper")[1]; objDiv.scrollTop = objDiv.scrollHeight; }, false); });  
asked
1 answers
0

https://appstore.home.mendix.com/link/app/43096/ does this widget work for you?

answered