Skip to content

Commit e75e128

Browse files
committed
[mv3] Load procedural CSS code on demand
1 parent 6bfa724 commit e75e128

File tree

3 files changed

+782
-717
lines changed

3 files changed

+782
-717
lines changed

platform/mv3/extension/js/background.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,17 @@ function onMessage(request, sender, callback) {
213213
});
214214
return true;
215215

216+
case 'injectCSSProceduralAPI':
217+
browser.scripting.executeScript({
218+
files: [ '/js/scripting/css-procedural-api.js' ],
219+
target: { tabId, frameIds: [ frameId ] },
220+
}).catch(reason => {
221+
console.log(reason);
222+
}).then(( ) => {
223+
callback();
224+
});
225+
return true;
226+
216227
default:
217228
break;
218229
}

0 commit comments

Comments
 (0)