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-7.3.0 lib/watir/js_snippets/elementObscured.js
watir-7.2.2 lib/watir/js_snippets/elementObscured.js
watir-7.2.1 lib/watir/js_snippets/elementObscured.js
watir-7.2.0 lib/watir/js_snippets/elementObscured.js
watir-7.1.0 lib/watir/js_snippets/elementObscured.js
watir-7.0.0 lib/watir/js_snippets/elementObscured.js
watir-7.0.0.beta5 lib/watir/js_snippets/elementObscured.js
watir-7.0.0.beta4 lib/watir/js_snippets/elementObscured.js
watir-7.0.0.beta3 lib/watir/js_snippets/elementObscured.js
watir-7.0.0.beta2 lib/watir/js_snippets/elementObscured.js
watir-7.0.0.beta1 lib/watir/js_snippets/elementObscured.js
watir-6.19.1 lib/watir/js_snippets/elementObscured.js
watir-6.19.0 lib/watir/js_snippets/elementObscured.js
watir-6.18.0 lib/watir/js_snippets/elementObscured.js
watir-6.17.0 lib/watir/js_snippets/elementObscured.js
watir-6.16.5 lib/watir/js_snippets/elementObscured.js
watir-6.16.4 lib/watir/js_snippets/elementObscured.js
watir-6.16.3 lib/watir/js_snippets/elementObscured.js
watir-6.16.2 lib/watir/js_snippets/elementObscured.js
watir-6.16.1 lib/watir/js_snippets/elementObscured.js