Using Scaledrone with Web Workers
The Scaledrone JavaScript library assigns the constructor to the window object. As the window object is unavailable in Web Workers a workaround needs to be used:
// worker file
const window = {};
importScripts('https://cdn.scaledrone.com/scaledrone-lite.min.js');
const Scaledrone = window.Scaledrone;
/*
* You can now use Scaledrone:
* const drone = new Scaledrone(..)
* ..
*/