My app is loading the platform.js
file asynchronously with the attributes of async defer
.
<script src="https://apis.google.com/js/platform.js?onload=onLoadCallback" async defer>
</script>
I am looking for a callback function that will alert me when the library has loaded successfully or if there was an error during loading.
Can a callback be added directly in the script tag?
Additionally, since we are using defer
, does that mean there should be a promise
involved as well?