VulpesOS/gaia/apps/calendar/js/caldav_worker.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

32 lines
631 B
JavaScript
Executable file

'use strict';
require.config({
baseUrl: '/js',
waitSeconds: 60,
paths: {
shared: '/shared/js'
},
shim: {
'ext/caldav': {
deps: ['worker/initialize'],
exports: 'Caldav'
},
'ext/ical': {
deps: ['worker/initialize'],
exports: 'ICAL'
}
}
});
self.addEventListener('message', function onMessage(msg) {
if (typeof(caldav) !== 'undefined') {
return self.thread.respond(msg.data);
}
// Try again in a little bit since the worker may not be ready...
setTimeout(function() {
onMessage(msg);
}, 10);
});
require(['worker/initialize'], initialize => initialize());