On Nov 27, 2008, at 7:57 AM, Mark Wyszomierski wrote:

Hi,

I'm wondering if webkit exposes any method to do a virtual hit testing via javascript. I'm looking to use some method like:

    function hittest(int x, int y)
    {
        for (all nodes in DOM) {
            return top-most node that gets intersected;
        }

        return null;
    }

Not sure if this is the right place to asking, I cannot find information elsewhere. I'm targeting only safari which I believe uses webkit, so, I just wanted to know if any such functionality in the base might exist so a javascript function might exist,

Have a look at document.elementFromPoint()
<https://developer.mozilla.org/En/DOM:document.elementFromPoint>

Simon

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to