addScriptToExecuteOnDocumentCreated method
Adds the provided JavaScript script to a list of scripts that should
be run after the global object has been created, but before the HTML
document has been parsed and before any other script included by the
HTML document is run.
Returns a ScriptID on success which can be used for removeScriptToExecuteOnDocumentCreated.
Implementation
Future<ScriptID?> addScriptToExecuteOnDocumentCreated(String script) async {
if (_isDisposed) {
return null;
}
return _channel.invokeMethod<String?>(
'addScriptToExecuteOnDocumentCreated',
script,
);
}