addScriptToEvaluateOnLoad method

  1. @Deprecated('use addScriptToEvaluateOnNewDocument instead')
Future<ScriptIdentifier> addScriptToEvaluateOnLoad(
  1. String scriptSource
)

Deprecated, please use addScriptToEvaluateOnNewDocument instead. Returns: Identifier of the added script.

Implementation

@Deprecated('use addScriptToEvaluateOnNewDocument instead')
Future<ScriptIdentifier> addScriptToEvaluateOnLoad(
    String scriptSource) async {
  var result = await _client.send('Page.addScriptToEvaluateOnLoad', {
    'scriptSource': scriptSource,
  });
  return ScriptIdentifier.fromJson(result['identifier'] as String);
}