michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: 'use strict'; michael@0: michael@0: const ContentWorker = require('../content/worker').Worker; michael@0: michael@0: function Worker(options, window) { michael@0: options.window = window; michael@0: michael@0: let worker = ContentWorker(options); michael@0: worker.once("detach", function detach() { michael@0: worker.destroy(); michael@0: }); michael@0: return worker; michael@0: } michael@0: exports.Worker = Worker;