searchInResource method
Searches for given string in resource content.
frameId
Frame id for resource to search in.
url
URL of the resource 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<debugger.SearchMatch>> searchInResource(
FrameId frameId, String url, String query,
{bool? caseSensitive, bool? isRegex}) async {
var result = await _client.send('Page.searchInResource', {
'frameId': frameId,
'url': url,
'query': query,
if (caseSensitive != null) 'caseSensitive': caseSensitive,
if (isRegex != null) 'isRegex': isRegex,
});
return (result['result'] as List)
.map((e) => debugger.SearchMatch.fromJson(e as Map<String, dynamic>))
.toList();
}