Skip to content

Level 1 Core DOM Exception: Hierarchy_Request_Err #290

Closed
@ghost

Description

Reading this url: http://www.toshibadirect.com/td/b2c/laptops.to , I consistently get this error:

../node_modules/jsdom/lib/jsdom/level1/core.js:1275
throw new core.DOMException(HIERARCHY_REQUEST_ERR);
^
Error: Hierarchy request error
at Object.appendChild (/Users/funk/node_modules/jsdom/lib/jsdom/level1/core.js:1275:13)
at setChild (/Users/funk/node_modules/jsdom/lib/jsdom/browser/htmltodom.js:167:17)
at HtmlToDom.appendHtmlToElement (/Users/funk/node_modules/jsdom/lib/jsdom/browser/htmltodom.js:77:9)
at Object.innerHTML (/Users/funk/node_modules/jsdom/lib/jsdom/browser/index.js:384:27)
at Object.write (/Users/funk/node_modules/jsdom/lib/jsdom/level2/html.js:391:22)
at Object.jsdom (/Users/funk/node_modules/jsdom/lib/jsdom.js:53:9)
at Object.html (/Users/funk/node_modules/jsdom/lib/jsdom.js:91:18)
at /Users/funk/node_modules/jsdom/lib/jsdom.js:206:26
at Request.callback (/Users/funk/node_modules/jsdom/lib/jsdom.js:289:17)
at Request. (/Users/funk/node_modules/jsdom/node_modules/request/main.js:314:21)

The url is read from a standard jsdom idiom:

jsdom.env(url, [ 'http://code.jquery.com/jquery-1.6.2.min.js' ], function (error, window) { ... }.

Interestingly, I've wrapped the jsdom.env call in a try/catch block. Yet the exception is not trapped. Warning: I'm a javascript novice. But in java, a try/catch(throwable) would definitely catch the error.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions