(script)
| 42 | * Detect if script has onClick capability |
| 43 | */ |
| 44 | export function detectCanClick(script) { |
| 45 | for (let context of CONTEXTS) { |
| 46 | for (let fn of injectAllFramesFns(["onClick"])) { |
| 47 | if (typeof script[context]?.[fn] === "function") { |
| 48 | return true; |
| 49 | } |
| 50 | } |
| 51 | } |
| 52 | return false; |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Detect if script can auto-run |
no test coverage detected