searchInContent method
Searches for given string in script content.
scriptId
Id of the script to search in.
query
String to search for.
caseSensitive
If true, search is case sensitive.
isRegex
If true, treats string parameter as regex.
Returns: List of search matches.
Implementation
Future<List<SearchMatch>> searchInContent(
runtime.ScriptId scriptId, String query,
{bool? caseSensitive, bool? isRegex}) async {
var result = await _client.send('Debugger.searchInContent', {
'scriptId': scriptId,
'query': query,
if (caseSensitive != null) 'caseSensitive': caseSensitive,
if (isRegex != null) 'isRegex': isRegex,
});
return (result['result'] as List)
.map((e) => SearchMatch.fromJson(e as Map<String, dynamic>))
.toList();
}