4 ms·
Isn't it backwards? WHATWG — there should be two implementations first. Edit: we would not like if Chrome only feature was standardized. Lets have dialog, not
by sergeykish 6y ago
Isn't it backwards? WHATWG — there should be two implementations first.
Edit: we would not like if Chrome only feature was standardized. Lets have dialog, not silent downvotes.
XPath is great, for example
$x('//text()[last()]')
finds last Text node. It is possible to query by text content
$x("//a[text() = 'parent']")
finds parent links on the page. Other the years CSS adopted many selector, recent addition - :has(direct children) not implemented yet
$("//a[img]')
works. I would like to hear other examples.
What XPath needs is modern interface like CSS has. It is easy to shim [1]
document.queryXPathAll
That would be much better proposal
[1] https://developer.mozilla.org/en-US/docs/Web/CSS/:has https://developer.mozilla.org/en-US/docs/Web/CSS/:has
[2] http://sergeykish.com/web-api-element-prototype-queryxpathall http://sergeykish.com/web-api-element-prototype-queryxpathal...