X
Kliknite sem pre prechod na mobilnú verziu webu.

Fórum podpory

What syntax does the search feature in Developer tools use?

Pridané

The search boxes in the inspector window window returns no results whenever I try to search for specific key-value pairs like: role="main".

I can only get results for main or role. Is there a search string parameter/syntax reference anywhere? I've searched high and low, but articles/references found in the documentation is VERY basic.

Thanks

The search boxes in the inspector window window returns no results whenever I try to search for specific key-value pairs like: role="main". I can only get results for main or role. Is there a search string parameter/syntax reference anywhere? I've searched high and low, but articles/references found in the documentation is VERY basic. Thanks

Vybrané riešenie

Hi,

I'm not aware of any documentation for it, although there might be something. As far as I can tell, you can typically just search for a string of text, but this won't work in some cases, like what you've found. You can also type CSS selectors to find elements, which works a lot better - for your example, you could use this CSS selector:

[role="main"]

Hope that helps!

Čítať túto odpoveď v kontexte 1

Ďalšie informácie o systéme

Aplikácie

  • Identifikácia prehliadača: Mozilla/5.0 (Linux; Android 8.0.0; SM-G965U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36

Viac informácií

user1929 72 riešení 290 odpovedí

Vybrané riešenie

Hi,

I'm not aware of any documentation for it, although there might be something. As far as I can tell, you can typically just search for a string of text, but this won't work in some cases, like what you've found. You can also type CSS selectors to find elements, which works a lot better - for your example, you could use this CSS selector:

[role="main"]

Hope that helps!

Hi, I'm not aware of any documentation for it, although there might be something. As far as I can tell, you can typically just search for a string of text, but this won't work in some cases, like what you've found. You can also type CSS selectors to find elements, which works a lot better - for your example, you could use this CSS selector: <pre> [role="main"] </pre> Hope that helps!