webext-schema 5.0.3 → 5.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1066,16 +1066,18 @@ export const isTab = async tabId => {
1066
1066
  /**
1067
1067
  * get current theme
1068
1068
  *
1069
+ * @param {number} windowId - window ID
1069
1070
  * @returns {object} - theme.Theme
1070
1071
  */
1071
- export const getCurrentTheme = async () => {
1072
+ export const getCurrentTheme = async windowId => {
1072
1073
  const isGranted = await isPermissionGranted({
1073
1074
  permissions: ['theme']
1074
1075
  });
1075
1076
  let currentTheme;
1076
1077
  if (isGranted) {
1077
1078
  const { theme } = browser;
1078
- currentTheme = await theme.getCurrent();
1079
+ currentTheme =
1080
+ await theme.getCurrent(Number.isInteger(windowId) ? windowId : null);
1079
1081
  }
1080
1082
  return currentTheme ?? null;
1081
1083
  };
package/package.json CHANGED
@@ -38,7 +38,7 @@
38
38
  "devDependencies": {
39
39
  "c8": "^7.12.0",
40
40
  "chai": "^4.3.6",
41
- "eslint": "^8.23.1",
41
+ "eslint": "^8.24.0",
42
42
  "eslint-config-standard": "^17.0.0",
43
43
  "eslint-plugin-import": "^2.26.0",
44
44
  "eslint-plugin-jsdoc": "^39.3.6",
@@ -48,5 +48,5 @@
48
48
  "nock": "^13.2.9",
49
49
  "npm-run-all": "^4.1.5"
50
50
  },
51
- "version": "5.0.3"
51
+ "version": "5.0.4"
52
52
  }