* Returns a function that proxies to the given method name on the globals * console object. The proxy will also detect if the console doesn't exist and * will appropriately no-op. This allows support for IE9, which doesn't have a * console if the developer tools are not open.
(method)
| 40 | * console if the developer tools are not open. |
| 41 | */ |
| 42 | function consoleProxy(method) { |
| 43 | return function () { |
| 44 | if (console) { |
| 45 | console[method].apply(console, arguments); |
| 46 | } |
| 47 | }; |
| 48 | } |
| 49 | |
| 50 | var Logger = { |
| 51 | warn: consoleProxy("warn") |