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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js

Issue 2728543002: DevTools: refactor Common.Renderer for DOM nodes (Closed)
Patch Set: fixup Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/elements/module.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
index b6d4378f881608d8dfd771da4ddf8d60ced25743..3ff7d632d11f6ed66743308e2c96bc550b25ead0 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/DOMModel.js
@@ -1847,13 +1847,15 @@ SDK.DOMModel = class extends SDK.SDKModel {
/**
* @param {!SDK.RemoteObject} object
- * @param {function(?SDK.DOMNode)} callback
+ * @return {!Promise<?SDK.DOMNode>}
*/
- pushObjectAsNodeToFrontend(object, callback) {
- if (object.isNode())
- this.pushNodeToFrontend(/** @type {string} */ (object.objectId), callback);
- else
- callback(null);
+ pushObjectAsNodeToFrontend(object) {
+ return new Promise(fulfill => {
+ if (object.isNode())
+ this.pushNodeToFrontend(/** @type {string} */ (object.objectId), fulfill);
+ else
+ fulfill(null);
+ });
}
/**
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/elements/module.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698