{"id":108,"date":"2012-03-28T21:30:08","date_gmt":"2012-03-28T21:30:08","guid":{"rendered":"http:\/\/garysieling.com\/blog\/?p=108"},"modified":"2012-03-28T21:30:08","modified_gmt":"2012-03-28T21:30:08","slug":"how-to-fix-error-namespace_err-dom-exception-14-in-chrome","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/how-to-fix-error-namespace_err-dom-exception-14-in-chrome\/","title":{"rendered":"How to fix &#8220;Error: NAMESPACE_ERR: DOM Exception 14&#8221; in Chrome"},"content":{"rendered":"<p>The only references I&#8217;ve found online are to an old bug in Chrome.<\/p>\n<pre>\nError: NAMESPACE_ERR: DOM Exception 14\n<\/pre>\n<p>I generated this with the following xpath expression generated by Firebug:<\/p>\n<pre>\nid('content')\/x:div[2]\/x:div[3]\/x:div[1]\/x:h2[2]\n<\/pre>\n<p>This causes this javascript line to fail:<\/p>\n<pre>\ndocument.evaluate(\"id('content')\/x:div[2]\/x:div[3]\/x:div[1]\/x:h2[2]\", document, null, XPathResult.ANY_TYPE, null)\n<\/pre>\n<p>The fix is very simple: remove the namespaces &#8211; the &#8220;x:&#8221;, like so:<\/p>\n<pre>\nid('content')\/div[2]\/div[3]\/div[1]\/h2[2]\n<\/pre>\n<p>And then the JS code will work:<\/p>\n<pre>\ndocument.evaluate(\"id('content')\/div[2]\/div[3]\/div[1]\/h2[2]\", document, null, XPathResult.ANY_TYPE, null)\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The only references I&#8217;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(&#8216;content&#8217;)\/x:div[2]\/x:div[3]\/x:div[1]\/x:h2[2] This causes this javascript line to fail: document.evaluate(&#8220;id(&#8216;content&#8217;)\/x:div[2]\/x:div[3]\/x:div[1]\/x:h2[2]&#8221;, document, null, XPathResult.ANY_TYPE, null) The fix is very simple: remove the namespaces &#8211; the &#8220;x:&#8221;, like so: &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.garysieling.com\/blog\/how-to-fix-error-namespace_err-dom-exception-14-in-chrome\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to fix &#8220;Error: NAMESPACE_ERR: DOM Exception 14&#8221; in Chrome&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/108"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=108"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/108\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}