OLD | NEW |
---|---|
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 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1139 var member = "$" + i; | 1139 var member = "$" + i; |
1140 if (member in inspectedWindow || inScopeVariables(member)) | 1140 if (member in inspectedWindow || inScopeVariables(member)) |
1141 continue; | 1141 continue; |
1142 | 1142 |
1143 this.__defineGetter__("$" + i, bind(commandLineAPIImpl._inspectedObject, commandLineAPIImpl, i)); | 1143 this.__defineGetter__("$" + i, bind(commandLineAPIImpl._inspectedObject, commandLineAPIImpl, i)); |
1144 } | 1144 } |
1145 | 1145 |
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! |
aandrey
2013/04/17 15:56:48
Do you follow this note?
SeRya
2013/04/18 06:41:22
I didn't. Thank you for the catch. Fixed.
| |
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", "table" | 1156 "monitorEvents", "unmonitorEvents", "inspect", "copy", "clear", "getEventLis teners", |
1157 "debug", "table" | |
1157 ]; | 1158 ]; |
1158 | 1159 |
1159 /** | 1160 /** |
1160 * @constructor | 1161 * @constructor |
1161 */ | 1162 */ |
1162 function CommandLineAPIImpl() | 1163 function CommandLineAPIImpl() |
1163 { | 1164 { |
1164 } | 1165 } |
1165 | 1166 |
1166 CommandLineAPIImpl.prototype = { | 1167 CommandLineAPIImpl.prototype = { |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1303 }, | 1304 }, |
1304 | 1305 |
1305 /** | 1306 /** |
1306 * @param {Node} node | 1307 * @param {Node} node |
1307 */ | 1308 */ |
1308 getEventListeners: function(node) | 1309 getEventListeners: function(node) |
1309 { | 1310 { |
1310 return InjectedScriptHost.getEventListeners(node); | 1311 return InjectedScriptHost.getEventListeners(node); |
1311 }, | 1312 }, |
1312 | 1313 |
1314 debug: function(fn) | |
1315 { | |
1316 InjectedScriptHost.setBreakpoint(fn); | |
1317 }, | |
1318 | |
1313 table: function() | 1319 table: function() |
1314 { | 1320 { |
1315 inspectedWindow.console.table.apply(inspectedWindow.console, arguments); | 1321 inspectedWindow.console.table.apply(inspectedWindow.console, arguments); |
1316 }, | 1322 }, |
1317 | 1323 |
1318 /** | 1324 /** |
1319 * @param {number} num | 1325 * @param {number} num |
1320 */ | 1326 */ |
1321 _inspectedObject: function(num) | 1327 _inspectedObject: function(num) |
1322 { | 1328 { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1355 */ | 1361 */ |
1356 _logEvent: function(event) | 1362 _logEvent: function(event) |
1357 { | 1363 { |
1358 inspectedWindow.console.log(event.type, event); | 1364 inspectedWindow.console.log(event.type, event); |
1359 } | 1365 } |
1360 } | 1366 } |
1361 | 1367 |
1362 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); | 1368 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); |
1363 return injectedScript; | 1369 return injectedScript; |
1364 }) | 1370 }) |
OLD | NEW |