Attach function to DOMWindow Object
<p>I have this nice little snippet i've made for getting browser position:</p>

<pre><code>if (!window.position) {
    window.position = function() {
        return navigator.appName.toLowerCase().indexOf("explorer") &gt;= 0 ? { x: window.screenLeft, y: window.screenTop } : { x: window.screenX, y: window.screenY };
    };
};
</code></pre>

<p>It works great, what i'm wondering is, anyone know (i can't seems to find/remember if it exist) if there is something like a "_prototype" so that I can attach the function permanently.  This would be useful in the case I have something like:</p>

<pre><code>var bob =   window.open(...);
</code></pre>

<p>So then I could say:</p>

<pre><code>var bobSposisition = bob.position(); // and of course get the same thing on bob tht i'm getting on my current parent window.
</code></pre>
