how to wait until my document is loaded in js code example
Example: javascript wait for document load
document.addEventListener("DOMContentLoaded", function(event) {
//do work
});
document.addEventListener("DOMContentLoaded", function(event) {
//do work
});