Skip to content
This repository has been archived by the owner on Mar 29, 2021. It is now read-only.

Commit

Permalink
Clean up implementation of Runtime.compileScript. Fixes #62
Browse files Browse the repository at this point in the history
  • Loading branch information
auchenberg committed Jun 24, 2017
1 parent 5d41e65 commit 97de552
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/protocols/ios/ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,20 @@ export abstract class IOSProtocol extends ProtocolAdapter {
}

private onRuntimeOnCompileScript(msg: any): Promise<any> {
msg.method = 'Runtime.evaluate'
return Promise.resolve(msg);
var params = {
expression: msg.params.expression,
contextId: msg.params.executionContextId
}

this._target.callTarget('Runtime.evaluate', params).then((obj) => {
var results = {
scriptId: null,
exceptionDetails: null
}
this._target.fireResultToTools(msg.id, results);
});

return Promise.resolve(null);
}

private onScriptParsed(msg: any): Promise<any> {
Expand Down

0 comments on commit 97de552

Please sign in to comment.