DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (5b81998bb7ab)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<html>
    <head>
        <script>
            // We want to put an expando on the object, but we want this object
            // to be wrapped in other compartments. This means that the expando
            // must implement precreate, which happens (in general) for nodes.
            // So we just do a cyclic reference to the document body.
            window.expando = document.documentElement;

            function testme(obj) {
                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                const Ci = Components.interfaces;
                const utils = window.QueryInterface(Ci.nsIInterfaceRequestor)
                                    .getInterface(Ci.nsIDOMWindowUtils);

                return utils.getClassName(obj) != "Proxy" &&
                       typeof obj.querySelector == 'function';
            }
        </script>
    </head>