XPath in JavaScript

(new XPathEvaluator()).createExpression('//*[contains(@class, \'title\')]//text()').evaluate(document.body).iterateNext()