d3.html()

d3.html(url[, callback])

Creates a request for the HTML file at the specified url with the default mime type text/html. The HTML file is returned as a document fragment.

This convenience constructor is approximately equivalent to:

d3.request(url)
    .mimeType("text/html")
    .response(function(xhr) { return document.createRange().createContextualFragment(xhr.responseText); })
    .get(callback);

HTML parsing requires a global document and relies on DOM Ranges, which are not supported by JSDOM as of version 8.3; thus, this method is supported in browsers but not in Node.

doc_D3_Js
2016-11-24 10:26:43
Comments
Leave a Comment

Please login to continue.