From 0d2d1f75b04b1d400ae844c4adffdeab690cb2af Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Mon, 3 Feb 2025 14:30:22 -0600 Subject: [PATCH] sendMessage in BackgroundUtil --- src/kiss_firefox/BackgroundUtil.kiss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kiss_firefox/BackgroundUtil.kiss b/src/kiss_firefox/BackgroundUtil.kiss index 6206799..f42e8a6 100644 --- a/src/kiss_firefox/BackgroundUtil.kiss +++ b/src/kiss_firefox/BackgroundUtil.kiss @@ -2,6 +2,9 @@ (function createTab [:String url] (API.browser.tabs.create (objectWith url))) +(function sendMessage [:Int tabId :String type :Array 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