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

qcontextmenu

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qcontextmenu

qcontextmenu is a simple contextmenu menu tool for web

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

QContextMenu

  • Support html tags
  • Number of dynamic menus
  • Simple packaging
  • Unlimited levels
  • Browser boundary recognition and adaptation
  • demo

License

BSD 3-Clause License

Installation

 npm i qcontextmenu

Usage

  import ContextMenu from "qcontextmenu";
  let menuTool = new ContextMenu(document.body);
  window.oncontextmenu = function(e) {
            e.preventDefault();
            let x = e.clientX;
            let y = e.clientY;
            menuTool.show(function() {
                return [{
                    target: "edit",
                    text: "<b>edinode</b>wireless level",
                    callback: function(node) {
                        console.log(node);
                    },
                    children: [{
                        target: "edit",
                        text: "edinode2",
                        callback: function(node) {
                            console.log(node);
                        },
                        children: [{
                            target: "edit",
                            text: "edinode3",
                            callback: function(node) {
                                console.log(node);
                            },

                        }, {
                            target: "addChild",
                            text: "addChild",
                            callback: function(node) {
                                console.log(node);
                            },
                        }, {
                            target: "addBrother",
                            text: "addBrother",
                            callback: function(node) {
                                console.log(node);
                            },
                        }, ]
                    }]
                }, {
                    target: "addChild",
                    text: "addChild",
                    callback: function(node) {
                        console.log(node);
                    },
                }, {
                    target: "addBrother",
                    text: "addBrother",
                    callback: function(node) {
                        console.log(node);
                    },
                }, {
                    target: "noThing",
                    text: "noThing",
                    callback: function(node) {
                        console.log("do nothing callback", node);
                    },
                }]

            }, {
                x: x + "px",
                y: y + "px"
            })
        };

Keywords

FAQs

Package last updated on 23 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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