function createWorker(s, cb) {
const worker = new window.Worker(
window.URL.createObjectURL(
new Blob(
[
`
importScripts('https://unpkg.com/oboe@2.1.4/dist/oboe-browser.min.js');
self.onmessage = function(e){
oboe(e.data.url)
.node('{id name}', function(res) {
if(e.data.till_id && res.id === e.data.till_id){
this.abort();
}
self.postMessage({
load: res
});
});
};`
],
{
type: "text/javascript"
}
)
)
);
if (typeof cb == "function") {
cb(worker);
}
}