PageSourceSearch

https://lvds.in/wp-content/plugins/clockify-lite/public/js/clock-event-compat.js?ver=1.1.0

js lvds.in collected 2026-10-08 07:13:18 UTC 1,422 bytes, 36 lines download raw bytes

1(function (window, document) {
2    'use strict';
3
4    // Compatibility shim for third-party delegated event handlers that call
5    // event.target.closest() when the target can be a non-Element EventTarget
6    // (for example a text node). Only adds the method when it is missing.
7    if (!window || !window.EventTarget || !window.Element || !window.Element.prototype.closest) {
8        return;
9    }
10
11    if (typeof window.EventTarget.prototype.closest !== 'function') {
12        var nativeClosest = window.Element.prototype.closest;
13        try {
14            Object.defineProperty(window.EventTarget.prototype, 'closest', {
15                configurable: true,
16                writable: true,
17                value: function (selector) {
18                    var node = this;
19                    if (!node) {
20                        return null;
21                    }
22                    if (node.nodeType !== 1) {
23                        node = node.parentElement || node.parentNode;
24                    }
25                    if (!node || node.nodeType !== 1) {
26                        return null;
27                    }
28                    return nativeClosest.call(node, selector);
29                }
30            });
31        } catch (e) {
32            // Older/locked environments may reject prototype extension.
33            // Clockinator functionality does not depend on this shim.
34        }
35    }
36})(window, document);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.