| 210 | } |
| 211 | } |
| 212 | class EdgeRuntimeBridge { |
| 213 | get id() { return bridgeLog.DoActionAndLog(() => { return myBrowser.runtime.id; }, "runtime.id"); } |
| 214 | get lastError() { return bridgeLog.DoActionAndLog(() => { return myBrowser.runtime.lastError; }, "runtime.lastError"); } |
| 215 | get onConnect() { return bridgeLog.DoActionAndLog(() => { return myBrowser.runtime.onConnect; }, "runtime.onConnect"); } |
| 216 | get onInstalled() { return bridgeLog.DoActionAndLog(() => { return myBrowser.runtime.onInstalled; }, "runtime.onInstalled"); } |
| 217 | get onMessage() { return bridgeLog.DoActionAndLog(() => { return myBrowser.runtime.onMessage; }, "runtime.onMessage"); } |
| 218 | get onMessageExternal() { return bridgeLog.DoActionAndLog(() => { return myBrowser.runtime.onMessageExternal; }, "runtime.onMessageExternal"); } |
| 219 | connect(extensionId, connectInfo) { |
| 220 | return bridgeLog.DoActionAndLog(() => { |
| 221 | if (typeof connectInfo !== "undefined" && typeof connectInfo !== "null") { |
| 222 | return myBrowser.runtime.connect(extensionId, connectInfo); |
| 223 | } |
| 224 | else { |
| 225 | return myBrowser.runtime.connect(extensionId); |
| 226 | } |
| 227 | }, "runtime.connect"); |
| 228 | } |
| 229 | getBackgroundPage(callback) { |
| 230 | bridgeLog.DoActionAndLog(() => { |
| 231 | myBrowser.runtime.getBackgroundPage(callback); |
| 232 | }, "runtime.getBackgroundPage"); |
| 233 | } |
| 234 | getManifest() { |
| 235 | return bridgeLog.DoActionAndLog(() => { |
| 236 | return myBrowser.runtime.getManifest(); |
| 237 | }, "runtime.getManifest"); |
| 238 | } |
| 239 | getURL(path) { |
| 240 | return bridgeLog.DoActionAndLog(() => { |
| 241 | return myBrowser.runtime.getURL(path); |
| 242 | }, "runtime.getURL"); |
| 243 | } |
| 244 | sendMessage(extensionId, message, options, responseCallback) { |
| 245 | bridgeLog.DoActionAndLog(() => { |
| 246 | if (typeof responseCallback !== "undefined" && typeof responseCallback !== "null") { |
| 247 | myBrowser.runtime.sendMessage(extensionId, message, options, responseCallback); |
| 248 | } |
| 249 | else if (typeof options !== "undefined" && typeof options !== "null") { |
| 250 | myBrowser.runtime.sendMessage(extensionId, message, options); |
| 251 | } |
| 252 | else if (typeof message !== "undefined" && typeof message !== "null") { |
| 253 | myBrowser.runtime.sendMessage(extensionId, message); |
| 254 | } |
| 255 | else { |
| 256 | myBrowser.runtime.sendMessage(undefined, extensionId); |
| 257 | } |
| 258 | }, "runtime.sendMessage"); |
| 259 | } |
| 260 | } |
| 261 | class EdgeChromeRuntimeBridge extends EdgeRuntimeBridge { |
| 262 | get onConnectExternal() { bridgeLog.LogUnavailbleApi("runtime.onConnectExternal"); return bridgeHelper.fakeEvent; } |
| 263 | get onRestartRequired() { bridgeLog.LogUnavailbleApi("runtime.onRestartRequired"); return bridgeHelper.fakeEvent; } |
nothing calls this directly
no outgoing calls
no test coverage detected