Javascript examples for Function:Function Bind
Extending console.log without affecting log line
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from w w w .j a v a2 s . c o m*/ log = function() { var context = "My Descriptive Logger Prefix:"; return Function.prototype.bind.call(console.log, console, context); }(); log("This is a test..."); } </script> </head> <body> </body> </html>