(dd: IDisableDevtool)
| 11 | let isSuspend = () => false; |
| 12 | |
| 13 | export 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 | |
| 27 | function disableTarget (target: Window) { |
| 28 | // let key1 = 'shiftKey', key2 = 'ctrlKey'; |