I have an html file:index.html which contains some basic js libs. And I also have some modules:
a.html:
<div id='a'>
<script src="a1.js"></script>
<script src="a2.js"></script>
</div>
a1.js:
console.log('a1')
a2.js:
console.log('a2')
How can I dynamically load a.html into index.html and get the event that a1.js and a2.js are completed executed?