Can I (using javascript) detect if a javascript file has already loaded, and if not, add an onload handler? The script tag is added dynamically by a 3rd party library so I’m not able to dynamically insert it myself.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is ugly solution, but possible:
This function will be called each 500ms (0.5 second) and will check, if we have some global object/function, that 3rdparty could have. But if 3rdparty is made by the true gosu, then it couldn`t have any global stuff, as all work could be in some anonymous function and this solution will not work.
You should state, which 3rdparty you want to use and when.