Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

devtools-modules

Package Overview
Dependencies
Maintainers
12
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

devtools-modules - npm Package Compare versions

Comparing version 0.0.39 to 0.0.40

src/utils/text.js

2

package.json
{
"name": "devtools-modules",
"version": "0.0.39",
"version": "0.0.40",
"description": "DevTools Modules from M-C",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -5,6 +5,12 @@ /* This Source Code Form is subject to the terms of the Mozilla Public

const { formatKeyShortcut } = require("../utils/text");
const EventEmitter = require("../utils/event-emitter");
function inToolbox() {
return !window || window.parent.document.documentURI == "about:devtools-toolbox";
try {
return window.parent.document.documentURI == "about:devtools-toolbox";
} catch (e) {
// If `window` is not available, it's very likely that we are in the toolbox.
return true;
}
}

@@ -137,2 +143,5 @@

}
if (item.accelerator) {
menuitem.setAttribute("acceltext", formatKeyShortcut(item.accelerator));
}
parent.appendChild(menu);

@@ -170,3 +179,5 @@ } else if (item.type === "separator") {

}
if (item.accelerator) {
menuitem.setAttribute("acceltext", formatKeyShortcut(item.accelerator));
}
parent.appendChild(menuitem);

@@ -173,0 +184,0 @@ }

@@ -15,3 +15,2 @@ /* This Source Code Form is subject to the terms of the Mozilla Public

* - sublabel String
* - accelerator Accelerator
* - icon NativeImage

@@ -39,2 +38,4 @@ * - position String - This field allows fine-grained definition of the

* If false, the menu item will be entirely hidden.
* String accelerator
* If specified, will be used as accelerator text for MenuItem
*/

@@ -51,2 +52,3 @@ function MenuItem({

visible = true,
accelerator = "",
} = { }) {

@@ -62,4 +64,5 @@ this.accesskey = accesskey;

this.visible = visible;
this.accelerator = accelerator;
}
module.exports = MenuItem;
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