I have this script that is from a third party such as
<script id="snippet" src="https//something.com/dsd/something.js?key=35345" />
Im trying to use window.onload but I can't figure out how
I've searched StackOverflow and I've seen here where they recommend doing something like
<script type="text/javascript">
function codeAddress() {
alert('ok');
}
window.onload = codeAddress;
</script>
how can I put my script in a function to do this?
I also found this page that shows how to add it and they recommend doing
window.addEventListener('load', nameOfFunction);
but I dont have a function name. Ideally I would like do to something like
window.AddEventListener('load', "https://https//something.com/dsd/something.js?key=35345");