Tutorial: system.downloadPreloadScripts

system.downloadPreloadScripts

Download preload scripts from given URLs.

Example

const scripts = [
    { url: 'http://.../preload.js' },
    { url: 'http://.../preload2.js' }
];

fin.desktop.System(scripts, (downloadResults) => { 
    downloadResults.forEach(({url, success, error}) => {
        console.log(`URL: ${url}`);
        console.log(`Success: ${success}`);
        if (error) {
            console.log(`Error: ${error}`);
        }
    });
}, console.error);