runJavaScriptFromFileReturningResult method
Loads the content of of file from javaScriptFilePath and evaluates it as javascript code in the context of the
javascript environment with id javaScriptInstanceId, and returns the result.
The Future completes with an error if a JavaScript error occurred, or if the type the given expression evaluates to is unsupported.
Implementation
@override
Future<Object?> runJavaScriptFromFileReturningResult(
String javaScriptInstanceId,
String javaScriptFilePath,
) async {
final file = File(javaScriptFilePath);
final javaScript = await file.readAsString();
return runJavaScriptReturningResult(javaScriptInstanceId, javaScript);
}