This extension writes many things to the global Core prototype. That means you can have collisions with other extensions. An extension is supposed to set only one field in the prototype of the core and/or collections -- the same as the extension name.
It would be better to have something like this:
let menu = cy.contextMenu({ /* options... */ });
// or
let menu = cy.$('#some-node').contextMenu({ /* options... */ });
menu.enable();
menu.disable();
menu.add( someItem );
menu.remove( someItem );
menu.destroy();
// etc...
This extension writes many things to the global
Core
prototype. That means you can have collisions with other extensions. An extension is supposed to set only one field in the prototype of the core and/or collections -- the same as the extension name.It would be better to have something like this: