aboutsummaryrefslogtreecommitdiff
path: root/app/src/web/assets/js/click_debugger.ts
blob: 088271fa81420bbc2cdea9aaa0f0863f3a54f183 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// For desktop only

(function () {
    const _frostAContext = (e: Event) => {
        // Commonality; check for valid target
        const element = e.target || e.currentTarget || e.srcElement;
        if (!(element instanceof Element)) {
            console.log("No element found");
            return
        }
        console.log(`Clicked element ${element.tagName} ${element.className}`);
    };

    document.addEventListener('contextmenu', _frostAContext, true);
}).call(undefined);