Skip to content

Instantly share code, notes, and snippets.

@tobiu
Created March 28, 2022 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobiu/72e517234478202f67f41deffe87ae8b to your computer and use it in GitHub Desktop.
Save tobiu/72e517234478202f67f41deffe87ae8b to your computer and use it in GitHub Desktop.
Neo.ServiceWorker
import Neo from '../src/Neo.mjs';
import * as core from '../src/core/_export.mjs';
import ServiceBase from '../src/worker/ServiceBase.mjs';
/**
* @class Neo.ServiceWorker
* @extends Neo.worker.ServiceBase
* @singleton
*/
class ServiceWorker extends ServiceBase {
/**
* @member {String} workerId='service'
* @protected
*/
workerId = 'service'
static getConfig() {return {
/**
* @member {String} className='Neo.ServiceWorker'
* @protected
*/
className: 'Neo.ServiceWorker',
/**
* @member {Boolean} singleton=true
* @protected
*/
singleton: true
}}
}
Neo.applyClassConfig(ServiceWorker);
let instance = Neo.create(ServiceWorker);
Neo.applyToGlobalNs(instance);
export default instance;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment