Javascript examples for Language Basics:console
Make console Un-redefining
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <script type="text/javascript"> console = {}; try {//from w w w .ja v a 2 s . c o m console.log('test'); } catch(e){ console.log(e); console.log('No console'); } </script> <iframe id="text"></iframe> <script type="text/javascript"> console = window.frames[0].console; try { console.log('test'); } catch(e){ console.log('No console'); } </script> </body> </html>