toolkit/javascript/d3/src/core/html.js
changeset 47 c0b4a8b5a012
equal deleted inserted replaced
46:efd9c589177a 47:c0b4a8b5a012
       
     1 d3.html = function(url, callback) {
       
     2   d3.text(url, "text/html", function(text) {
       
     3     if (text != null) { // Treat empty string as valid HTML.
       
     4       var range = document.createRange();
       
     5       range.selectNode(document.body);
       
     6       text = range.createContextualFragment(text);
       
     7     }
       
     8     callback(text);
       
     9   });
       
    10 };