MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / click

Function click

scripts/libs/file-saver/index.js:93–101  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

91
92
93 function click(node) {
94 try {
95 node.dispatchEvent(new MouseEvent('click'));
96 } catch (e) {
97 var evt = document.createEvent('MouseEvents');
98 evt.initMouseEvent('click', true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);
99 node.dispatchEvent(evt);
100 }
101 } // Detect WebView inside a native macOS app by ruling out all browsers
102 // We just need to check for 'Safari' because all other browsers (besides Firefox) include that too
103 // https://www.whatismybrowser.com/guides/the-latest-user-agent/macos
104

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected