Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: Source/WebCore/inspector/InjectedScriptSource.js

Issue 14148002: Added a shortcut for the console.table function. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 this.$_ = injectedScript._lastResult; 1146 this.$_ = injectedScript._lastResult;
1147 } 1147 }
1148 1148
1149 // NOTE: Please keep the list of API methods below snchronized to that in WebIns pector.RuntimeModel! 1149 // NOTE: Please keep the list of API methods below snchronized to that in WebIns pector.RuntimeModel!
1150 /** 1150 /**
1151 * @type {Array.<string>} 1151 * @type {Array.<string>}
1152 * @const 1152 * @const
1153 */ 1153 */
1154 CommandLineAPI.members_ = [ 1154 CommandLineAPI.members_ = [
1155 "$", "$$", "$x", "dir", "dirxml", "keys", "values", "profile", "profileEnd", 1155 "$", "$$", "$x", "dir", "dirxml", "keys", "values", "profile", "profileEnd",
1156 "monitorEvents", "unmonitorEvents", "inspect", "copy", "clear", "getEventLis teners" 1156 "monitorEvents", "unmonitorEvents", "inspect", "copy", "clear", "getEventLis teners", "table"
1157 ]; 1157 ];
1158 1158
1159 /** 1159 /**
1160 * @constructor 1160 * @constructor
1161 */ 1161 */
1162 function CommandLineAPIImpl() 1162 function CommandLineAPIImpl()
1163 { 1163 {
1164 } 1164 }
1165 1165
1166 CommandLineAPIImpl.prototype = { 1166 CommandLineAPIImpl.prototype = {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 }, 1303 },
1304 1304
1305 /** 1305 /**
1306 * @param {Node} node 1306 * @param {Node} node
1307 */ 1307 */
1308 getEventListeners: function(node) 1308 getEventListeners: function(node)
1309 { 1309 {
1310 return InjectedScriptHost.getEventListeners(node); 1310 return InjectedScriptHost.getEventListeners(node);
1311 }, 1311 },
1312 1312
1313 table: function()
1314 {
1315 inspectedWindow.console.table.apply(inspectedWindow.console, arguments);
1316 },
1317
1313 /** 1318 /**
1314 * @param {number} num 1319 * @param {number} num
1315 */ 1320 */
1316 _inspectedObject: function(num) 1321 _inspectedObject: function(num)
1317 { 1322 {
1318 return InjectedScriptHost.inspectedObject(num); 1323 return InjectedScriptHost.inspectedObject(num);
1319 }, 1324 },
1320 1325
1321 /** 1326 /**
1322 * @param {Array.<string>|string=} types 1327 * @param {Array.<string>|string=} types
(...skipping 27 matching lines...) Expand all
1350 */ 1355 */
1351 _logEvent: function(event) 1356 _logEvent: function(event)
1352 { 1357 {
1353 inspectedWindow.console.log(event.type, event); 1358 inspectedWindow.console.log(event.type, event);
1354 } 1359 }
1355 } 1360 }
1356 1361
1357 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); 1362 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl();
1358 return injectedScript; 1363 return injectedScript;
1359 }) 1364 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698