Hide window.* methods in web page - Javascript DOM Event

Javascript examples for DOM Event:onload

Description

Hide window.* methods in web page

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){//ww  w .  j a  v  a  2s .  co  m
(function (window){
    //code and other functions here
    // here window is undefined
    console.log(window);
    console.log(window);
})();
    }

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials