fix(page): page.waitForFunction should work with multiline strings (#3727)
Fixes #3723
This commit is contained in:
parent
89fc2adff5
commit
f73197385a
@ -977,7 +977,7 @@ class WaitTask {
|
|||||||
this._frame = frame;
|
this._frame = frame;
|
||||||
this._polling = polling;
|
this._polling = polling;
|
||||||
this._timeout = timeout;
|
this._timeout = timeout;
|
||||||
this._predicateBody = helper.isString(predicateBody) ? 'return ' + predicateBody : 'return (' + predicateBody + ')(...args)';
|
this._predicateBody = helper.isString(predicateBody) ? 'return (' + predicateBody + ')' : 'return (' + predicateBody + ')(...args)';
|
||||||
this._args = args;
|
this._args = args;
|
||||||
this._runCount = 0;
|
this._runCount = 0;
|
||||||
frame._waitTasks.add(this);
|
frame._waitTasks.add(this);
|
||||||
|
Loading…
Reference in New Issue
Block a user