mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-10-09 12:51:45 -04:00
findElement: the name filter is one union; a literal is one by grammar
A name is a substring or a regex, never both, so the filter says so instead of carrying two optionals the caller has to null against each other. Whether `/.../x` is a literal is now decided by JavaScript's flag alphabet rather than "looks like letters", which stops `/usr/bin` from being read as a pattern with flags. Comments that narrated callers or the type name are gone; the literal parser gets its own test in place of two MCP round-trips.
This commit is contained in:
1 parent
5710f1d684
commit
90487270ba
6 files changed
+81
-81
No files matched your search
@@ -203,7 +203,7 @@ fn note(tool: browser_tools.Tool) []const u8 {
|
||||
.screenshot => "`path` is required: writes a PNG of the text layout.",
|
||||
.press => "Selector first! `page.press(\"Enter\")` binds \"Enter\" to `selector` and fails — use `page.press(null, \"Enter\")` or `page.press({ key: \"Enter\" })`.",
|
||||
.click, .fill, .scroll, .hover, .selectOption, .setChecked => "",
|
||||
.findElement => "`name` is a case-insensitive substring, or a JS regex literal like `/sign (in|up)/i` (case-insensitive even without `i`).",
|
||||
.findElement => "`name` is a case-insensitive substring, or a JS regex literal like `/sign (in|up)/` (also case-insensitive).",
|
||||
.search, .markdown, .html, .links, .tree, .nodeDetails, .interactiveElements, .structuredData, .detectForms, .consoleLogs, .getUrl, .getCookies, .getEnv => "",
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user