I’m trying to load a javascript file into an external page. And want a specific code to execute after the external page is loaded.
window.onload = function() {
\* execute this code after the page is loaded *\
}
But the code won’t execute if there’s an error on the external page I want to execute this code on, like an undefined variable or something like that. Is there a way to let the code ignore the errors and just execute?
Use a try catch block