You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
syedyasser edited this page Apr 11, 2017
·
1 revision
// Get the runtime object for this dom node
let {object} = yield this.rpc.request("DOM.resolveNode", {
nodeId: node.handle.nodeId
});
// Execute the function on the resolved runtime object
let functionDecl = "function() { return this.getBoundingClientRect(); }";
let {result} = yield this.rpc.request("Runtime.callFunctionOn", {
objectId: object.objectId,
functionDeclaration: functionDecl,
arguments: []
});
// Get all the properties from the returned object
let response = yield this.rpc.request("Runtime.getProperties", {
objectId: result.objectId
});