MCPcopy
hub / github.com/kickscondor/fraidycat / server

Method server

src/js/webext/storage.js:177–187  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

175 // Messaging functions.
176 //
177 server(fn) {
178 browser.runtime.onMessage.addListener(async (msg, sender) => {
179 if (sender.tab) {
180 msg.sender = sender.tab.id
181 if (msg.data)
182 msg.data = this.decode(msg.data)
183 fn(msg)
184 }
185 return true
186 })
187 }
188
189 client(fn) {
190 browser.runtime.onMessage.addListener(async (msg) => {

Callers 1

startFunction · 0.45

Calls 1

decodeMethod · 0.95

Tested by

no test coverage detected