ChromeDevTools / devtools-protocol

Chrome DevTools Protocol
https://chromedevtools.github.io/devtools-protocol/
BSD 3-Clause "New" or "Revised" License
1.15k stars 226 forks source link

Is it possible to have multiple search strings in Debugger.searchInContent? #150

Closed AshDee closed 5 years ago

AshDee commented 5 years ago

I had tried the Debugger.searchInContent with a single string and it works. Is it possible to have multiple search string for the command?

Having the functionality would be good to narrow down the search to particular keywords.

JoelEinbinder commented 5 years ago

I'm not sure what you mean. Can you solve this with regex?

AshDee commented 5 years ago

Hi @JoelEinbinder , currently I have the following code

const search = await client.send('Debugger.searchInContent',{scriptId:script_Id,query:'webpack'});

Here the search comes up good, but the problem is it also returns the results where webpack is part of tags.

I would like to search for specific words like WebpackJSON, webpackpolyfill. Regex is an option but would still give that one false answer.

AshDee commented 5 years ago

Hi @JoelEinbinder , I believe I would need only a single word to search in the content as of now. So closing the issue. But it would be good if there would be a option in future to search multiple words other than using RegEx :-)