How to fix “Error: NAMESPACE_ERR: DOM Exception 14” in Chrome

The only references I’ve found online are to an old bug in Chrome. Error: NAMESPACE_ERR: DOM Exception 14 I generated this with the following xpath expression generated by Firebug: id(‘content’)/x:div[2]/x:div[3]/x:div[1]/x:h2[2] This causes this javascript line to fail: document.evaluate(“id(‘content’)/x:div[2]/x:div[3]/x:div[1]/x:h2[2]”, document, null, XPathResult.ANY_TYPE, null) The fix is very simple: remove the namespaces – the “x:”, like so: …