forked from to/tombloo
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
現在の実装だとtombfix.js
内の処理に、component.js
と被っているものやユーティリティー系の関数がいくつかあるので、可能であれば、それらを全て別のファイルに切り出し、tombfix.js
では起動処理となるTombfixService
の作成とエクスポートに限定したい。
最終的には、だいたい以下の様な感じにしたいかな。
// core/src/components/components.js
/* global Components */
(function executeComponents(global) {
'use strict';
const {utils: Cu} = Components;
const {Utils} = Cu.import('resource://tombfix/Utils.jsm', {});
const {Tombfix} = Cu.import('resource://tombfix/Tombfix.jsm', {});
Utils.exportService(global, function TombfixService() {
this.init();
}, {
classDescription: 'Tombfix\'s JavaScript XPCOM Component',
contractID: '@tombfix.github.io/tombfix-service;1',
classID: '{ab5cbd9b-56e1-42e4-8414-2201edb883e7}',
init() {
Tombfix.init();
}
});
}(this));
Metadata
Metadata
Assignees
Labels
No labels