I was under impression that all latest browsers are with XPath 2 now. When I use lower-case()
and uppser-case()
(functions introduced in version 2) Chrome throws a syntax error. However, their older alternative translate()
works fine.
Is this a bug or does the latest Chrome actually use XPath 1? Is there a command / way to find out the XPath version?
// Finds the element as expected.
$x('//h2/text()[. = "Delete"]')
// Doesn't find the element (also expected).
$x('//h2/text()[. = "delete"]')
// SyntaxError: Failed to execute 'evaluate' on 'Document': The string '//h2/text()[lower-case(.) = "delete"]' is not a valid XPath expression.
$x('//h2/text()[lower-case(.) = "delete"]')