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

Commit

Permalink
Add missing delayMillis parameter to evaluateAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
andyjansson committed Jun 10, 2016
1 parent 64d0f0e commit fd17e53
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions SpecterJS/Bindings/Modules/WebPage/WebPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -443,10 +443,13 @@ public object Evaluate(dynamic func, params dynamic[] args)
}

[ScriptMember(Name = "evaluateAsync")]
public void EvaluateAsync(dynamic func, params dynamic[] args)
public void EvaluateAsync(dynamic func, int delayMillis = 0, params dynamic[] args)
{
Task.Factory.StartNew(() => Evaluate(func, args));
}
Task.Factory.StartNew(() => {
Thread.Sleep(delayMillis);
Evaluate(func, args);
});
}

[ScriptMember(Name = "evaluateJavascript")]
public object EvaluateJavascript(string source)
Expand Down

0 comments on commit fd17e53

Please sign in to comment.