We built a lot of things with Vanilla JS. You can find them all here:<p><a href="https://github.com/Qbix/Platform/blob/master/platform/plugins/Q/web/js/Q.js" rel="nofollow">https://github.com/Qbix/Platform/blob/master/platform/plugin...</a><p>And the documentation:<p><a href="https://qbix.com/platform/guide/javascript" rel="nofollow">https://qbix.com/platform/guide/javascript</a><p>It's open source so feel free to rip the code from there, or just use the full Q.js !<p>For loading code, a long time ago we just implemented two methods:<p><pre><code> Q.exports(a, b, c)
Q.require(src, callback)
</code></pre>
Following node but just async. It’s simple and it works. We were able to know the name of the latest loaded js file in exports() by a trick of throwing an exception and catching it to see what script was on the top of the stack. All browsers seem to support this.<p>Since it worked back then, we didn’t need anything else. It is super simple to just keep using those things and replace the middleware underneath to whatever is the standard du jour.<p>It's super short and simple, you can implement similar things in your projects:<p><a href="https://github.com/Qbix/Platform/blob/master/platform/plugins/Q/web/js/Q.js#L7842" rel="nofollow">https://github.com/Qbix/Platform/blob/master/platform/plugin...</a><p><a href="https://github.com/Qbix/Platform/blob/master/platform/plugins/Q/web/js/Q.js#L7826" rel="nofollow">https://github.com/Qbix/Platform/blob/master/platform/plugin...</a>