What does the param mean in SAEF?
<p>I'm newbie in javascript.I ever read the article with the SAEF,while i still have question, the code is below:<br>
    <pre>var addEvent = (function( window, document ) {
    if ( document.addEventListener ) {
        return function ( elem, type, callback ) {
            //if elem exist and is a single node.
            if ( elem &amp;&amp; !elem.length || elem === window ) { 
                elem.addEventListener( type, callback, false );
            } else if ( elem &amp;&amp; elem.length ) { //elem is an node of array
                for ( var i = 0; i &lt; elem.length; i++ ) {
                    addEvent( elem[i], type, callback );
                }
            }
        }
    } else if ( document.attachEvent ) {
        return function ( elem, type, callback ) {
            //if elem exist and is a single node
            if ( elem &amp;&amp; !elem.length || elem === window ) { 
                elem.attachEvent( 'on'+type, 
                    function () {
                        callback.call( elem, window.event );
                } );
            } else if ( elem &amp;&amp; elem.length ){
                for ( var i = 0; i &lt; elem.length; i++ ) {
                    addEvent( elem[i], type, callback );
                }
            }
        }
    }
})( this, document );
    </pre>
My question is what does the param this and document mean for?Are both of them the real param that will replace the param of window and document which are contained within the Anonymous function? </p>
