[Webkit-unassigned] [Bug 10686] myDiv instanceof Element returns false!

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Dec 9 07:41:46 PST 2006


http://bugs.webkit.org/show_bug.cgi?id=10686





------- Comment #2 from bugs.webkit.org at zetafleet.com  2006-12-09 07:41 PDT -------
(From update of attachment 11787)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
        <head>
                <title>instanceof test</title>
                <meta http-equiv="Content-Type" content="application/xhtml+xml;
charset=UTF-8"/>
        </head>
        <script type="text/javascript">
        // <![CDATA[
                window.addEventListener('load', function()
                {
                       
document.getElementById('clickme').addEventListener('click', function(evt)
                        {
                                try { alert("Object: "     + (evt instanceof
Object));     } catch(e) { errstr(e); }
                                try { alert("Event: "      + (evt instanceof
Event));      } catch(e) { errstr(e); }
                                try { alert("MouseEvent: " + (evt instanceof
MouseEvent)); } catch(e) { errstr(e); }
                                try { alert("Element: "        + (evt.target
instanceof Element));        } catch(e) { errstr(e); }
                                try { alert("HTMLElement: "    + (evt.target
instanceof HTMLElement));    } catch(e) { errstr(e); }
                                try { alert("HTMLDivElement: " + (evt.target
instanceof HTMLDivElement)); } catch(e) { errstr(e); }
                        }, false);
                }, false);

                function errstr(e)
                {
                        var errstr = "";
                        for(var i in e)
                        {
                                errstr += i + " = " + e[i] + "\n";
                        }
                        alert(errstr);
                };
        // ]]>
        </script>
<body>
        <div id="clickme">Click here to test instanceof Object, Event,
MouseEvent, Element, HTMLElement, and HTMLDivElement (one alert per test)</div>
</body>
</html>


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list