Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Module "console" | |
| 6 // | |
| 7 // This module provides basic logging support. The reason to define this module | |
| 8 // to forward calls to the |console| object exposed by the browser, instead of | |
| 9 // using that object directly: mojo JS bindings are currently loaded using gin | |
| 10 // and the |console| object is not always available. When we move away from | |
|
Eugene But (OOO till 7-30)
2017/01/10 19:32:52
nit: go/avoidwe :)
yzshen1
2017/01/10 20:13:08
Done.
| |
| 11 // gin, we will be able to get rid of this module. | |
| 12 | |
| 13 define("console", [], function() { | |
| 14 /** | |
| 15 * Logs a message to the console. | |
| 16 * @param {string} message to log. | |
| 17 */ | |
| 18 function log(message) { | |
| 19 console.log(message); | |
| 20 } | |
| 21 | |
| 22 var exports = {}; | |
| 23 exports.log = log; | |
| 24 return exports; | |
| 25 }); | |
| OLD | NEW |