| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 node: function(expression, evaluateOptions) | 196 node: function(expression, evaluateOptions) |
| 197 { | 197 { |
| 198 var parentElement = document.createElement("div"); | 198 var parentElement = document.createElement("div"); |
| 199 /** | 199 /** |
| 200 * @param {?number} nodeId | 200 * @param {?number} nodeId |
| 201 */ | 201 */ |
| 202 function onNodeAvailable(nodeId) | 202 function onNodeAvailable(nodeId) |
| 203 { | 203 { |
| 204 if (!nodeId) | 204 if (!nodeId) |
| 205 return; | 205 return; |
| 206 var node = WebInspector.domAgent.nodeForId(nodeId); | 206 var node = WebInspector.domModel.nodeForId(nodeId); |
| 207 var renderer = WebInspector.moduleManager.instance(WebInspector.Rend
erer, node); | 207 var renderer = WebInspector.moduleManager.instance(WebInspector.Rend
erer, node); |
| 208 if (renderer) | 208 if (renderer) |
| 209 parentElement.appendChild(renderer.render(node)); | 209 parentElement.appendChild(renderer.render(node)); |
| 210 else | 210 else |
| 211 console.error("No renderer for node found"); | 211 console.error("No renderer for node found"); |
| 212 } | 212 } |
| 213 /** | 213 /** |
| 214 * @param {!WebInspector.RemoteObject} remoteObject | 214 * @param {!WebInspector.RemoteObject} remoteObject |
| 215 */ | 215 */ |
| 216 function onEvaluate(remoteObject) | 216 function onEvaluate(remoteObject) |
| 217 { | 217 { |
| 218 remoteObject.pushNodeToFrontend(onNodeAvailable); | 218 remoteObject.pushNodeToFrontend(onNodeAvailable); |
| 219 } | 219 } |
| 220 this.evaluate(expression, evaluateOptions, onEvaluate); | 220 this.evaluate(expression, evaluateOptions, onEvaluate); |
| 221 return parentElement; | 221 return parentElement; |
| 222 } | 222 } |
| 223 } | 223 } |
| 224 | 224 |
| 225 WebInspector.ExtensionAuditCategoryResults._lastId = 0; | 225 WebInspector.ExtensionAuditCategoryResults._lastId = 0; |
| OLD | NEW |