VulpesOS/gaia/apps/calendar/js/worker/initialize.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

24 lines
668 B
JavaScript
Executable file

/**
* The way that the current caldav library works,
* we need to preconfigure some global state :/.
*/
define(function(require, exports, module) {
'use strict';
var Thread = require('./thread');
var debug = require('common/debug')('worker/initialize');
self.window = self;
module.exports = function() {
var thread = self.thread = new Thread(window);
thread.addRole('caldav');
window.console = new thread.console('worker');
require(['service/caldav'], (CaldavService) => {
// Lazily loaded so that we can prime environment first.
debug('Will create new caldav service...');
self.caldav = new CaldavService(thread.roles.caldav);
});
};
});