There are a couple of magic functions you can use to inspect and parse an HTML document while you’re reading it in the browser.
$x() allows you to check an XPATH. It’s basically a shorthand for
$$() allows you to check a CSS Selector. It’s basically a shorthand for
$x() returns an XPathResult — just like
document.evaluate() — which can only be inspected with the function
iterateNext(). But on Safari and Firefox
$x() will return an Array — just like
These shortcut functions can save some typing and mental effort.
Thanks to Andrew Krug from lazycoder.io for pointing out