sendMessage in BackgroundUtil

This commit is contained in:
2025-02-03 14:30:22 -06:00
parent 3f22c1f344
commit 0d2d1f75b0

View File

@@ -2,6 +2,9 @@
(function createTab [:String url]
(API.browser.tabs.create (objectWith url)))
(function sendMessage [:Int tabId :String type :Array<Dynamic> data]
(API.browser.tabs.sendMessage tabId (objectWith type data)))
// Requires the activeTab permission in manifest.json
(function runCode [tab :String jsCode]
(API.browser.tabs.executeScript tab.id