Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
script = document.createElement("script");
script.onload = function () {
console.log("Cordova script loaded!");
};
script.src = `platform_cordova_files/${platform}/cordova.js`;
body.appendChild(script);
console.log(`${platform} platform cordova.js injected.`);
}
if (deviceJs.android())
bodyPrepend("android");
else if (deviceJs.ios())
bodyPrepend("ios");
else
bodyPrepend("browser");