Asynchronously load JS links containing Objects

<script onload="document.dispatchEvent(new CustomEvent('file-loaded', { detail: { triggered: true }}))" async="async" src="aysncObject.js"></script>
<script async="async">
	document.addEventListener("file-loaded", function(){
		new aysncObject();
	});
</script>