Sha256: 7e214422f8a5e71eb8077c186b9b982e6405254aeb7be259736fd61d7d291c2b

Contents?: true

Size: 409 Bytes

Versions: 23

Compression:

Stored size: 409 Bytes

Contents

// Original Author: Florent B.
// Source: https://stackoverflow.com/a/45244889/1200545
function() {
    var elem = arguments[0],
        box = elem.getBoundingClientRect(),
        cx = box.left + box.width / 2,
        cy = box.top + box.height / 2,
        e = document.elementFromPoint(cx, cy);
    for (; e; e = e.parentElement) {
        if (e === elem)
            return false;
    }
    return true;
}

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
watir-6.16.0 lib/watir/js_snippets/elementObscured.js
watir-6.15.1 lib/watir/js_snippets/elementObscured.js
watir-6.15.0 lib/watir/js_snippets/elementObscured.js