AsyncScriptStep
public class AsyncScriptStep : ScriptStep
Step that runs some script which will return a result asynchronously via SwiftScraper.postMessage().
The StepFlowResult returned by the handler can be used to drive control flow of the steps.
-
Initializer.
Declaration
Swift
override public init( functionName: String, params: Any..., paramsKeys: [String] = [], handler: @escaping ScriptStepHandler )Parameters
functionNameThe name of the JavaScript function to call. The module namespace is automatically added.
paramsParameters which will be passed to the JavaScript function.
paramsKeysLook up the values from the JSON model dictionary using these keys, and pass them as the parameters to the JavaScript function. If provided, these are used instead of
params.handlerCallback function which returns data from JavaScript, and passes the model JSON dictionary for modification.
View on GitHub
Install in Dash