MCPcopy
hub / github.com/theajack/disable-devtool / disableKeyAndMenu

Function disableKeyAndMenu

src/utils/key-menu.ts:13–25  ·  view source on GitHub ↗
(dd: IDisableDevtool)

Source from the content-addressed store, hash-verified

11let isSuspend = () => false;
12
13export function disableKeyAndMenu (dd: IDisableDevtool) {
14 isSuspend = () => dd.isSuspend;
15
16 const top = window.top;
17 let parent = window.parent;
18 disableTarget(window);
19 if (!config.disableIframeParents || !top || !parent || top === window) return;
20 while (parent !== top) {
21 disableTarget(parent);
22 parent = parent.parent;
23 }
24 disableTarget(top);
25}
26
27function disableTarget (target: Window) {
28 // let key1 = 'shiftKey', key2 = 'ctrlKey';

Callers 1

main.tsFile · 0.90

Calls 1

disableTargetFunction · 0.85

Tested by

no test coverage detected