From 64aa9fcf538e31367a9443418c20aed1817b707a Mon Sep 17 00:00:00 2001 From: eight Date: Tue, 25 Sep 2018 17:34:54 +0800 Subject: [PATCH] Add: background worker --- background/background-worker.js | 12 ++++++++++++ background/background.js | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 background/background-worker.js diff --git a/background/background-worker.js b/background/background-worker.js new file mode 100644 index 00000000..6403a7ac --- /dev/null +++ b/background/background-worker.js @@ -0,0 +1,12 @@ +importScripts('/js/worker-util.js'); + +const {loadScript, createAPI} = workerUtil; + +createAPI({ + parseMozFormat(code) { + + }, + compileUsercss(style, allowErrors = false) { + + } +}); diff --git a/background/background.js b/background/background.js index 80f3f13a..20033b52 100644 --- a/background/background.js +++ b/background/background.js @@ -8,6 +8,8 @@ global usercss */ 'use strict'; +var backgroundWorker = workerUtil.createWorker('/background/background-worker.js'); + window.API_METHODS = Object.assign(window.API_METHODS || {}, { getStyles,