You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/BackgroundHandler.js
+23-4Lines changed: 23 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,6 @@ import { BgHandlerErrors as ERRORS, Error } from './Errors.js';
4
4
5
5
/**
6
6
* Class that will handle all the content scripts that will connect to the background script.
7
-
*
8
-
* @property {Map<string, Connection>} scriptConnections A Map that will relate every script ID to its Connection object.
9
-
* @property {object} exposedData The properties and methods exposed to the connecting scripts.
10
-
* @property {function} errorCallback A callback that gets fired whenever there is an error in the script. It will get passed some details about the error.
11
7
*/
12
8
classBackgroundHandlerextendsCustomEventTarget{
13
9
@@ -20,9 +16,14 @@ class BackgroundHandler extends CustomEventTarget {
/** @property {object} exposedData The properties and methods exposed to the connecting scripts. */
24
22
this.exposedData=exposedData;
23
+
/** @property {function} errorCallback A callback that gets fired whenever there is an error in the script. It will get passed some details about the error. */
25
24
this.errorCallback=options.errorCallback??null;
25
+
26
+
/** @property {chrome.runtime} runtime The runtime that will be used to create the connections. */
0 commit comments