Is there a dom-only way of sourcing scripts in pc?

I’m trying to do some platform detection with platform.js but I’m confused about about how to “source” a script in a playcanvas repo. I’ve uploaded the script “Platform.js” to the playcanvas project, how should I source it?

    var script = document.createElement('script');
    script.onload = function () {
    //do stuff with the script
    };
    script.src = "Platform.js"; // ??

    document.head.appendChild(script); //or something of the likes

Thank you.

All js scripts in the project get added as part of the DOM . You can change the order they are added via Editor -> Settings -> Script load order