New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

webext-messenger

Package Overview
Dependencies
Maintainers
3
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webext-messenger - npm Package Compare versions

Comparing version 0.25.1 to 0.25.2

10

distribution/thisTarget.js

@@ -1,2 +0,2 @@

import { isBackground, isContentScript, isExtensionContext, } from "webext-detect-page";
import { getContextName, isBackground, isContentScript, isExtensionContext, } from "webext-detect-page";
import { messenger } from "./sender.js";

@@ -115,2 +115,3 @@ import { registerMethods } from "./receiver.js";

}
// TODO: Add tests
export async function getThisFrame() {

@@ -120,3 +121,8 @@ await storeTabData(); // It should already have been called but we still need to await it

if (typeof tabId !== "number" || typeof frameId !== "number") {
throw new TypeError("This target is not in a frame");
let moreInfo = "(error retrieving context information)";
try {
moreInfo = `(context: ${getContextName()}, url: ${globalThis.location?.href})`;
}
catch { }
throw new TypeError(`This target is not in a frame ${moreInfo}`);
}

@@ -123,0 +129,0 @@ // Rebuild object to return exactly these two properties and nothing more

2

package.json
{
"name": "webext-messenger",
"version": "0.25.1",
"version": "0.25.2",
"description": "Browser Extension component messaging framework",

@@ -5,0 +5,0 @@ "keywords": [],

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc