Sha256: 3328a1490ee852825fc23e8ef1fa59ec6a37954954c2d9d6440f5b077a2aab65

Contents?: true

Size: 492 Bytes

Versions: 6

Compression:

Stored size: 492 Bytes

Contents

var d3_selectionRoot = d3_selection([[document]]);

d3_selectionRoot[0].parentNode = document.documentElement;

// TODO fast singleton implementation!
d3.select = function(selector) {
  return typeof selector === "string"
      ? d3_selectionRoot.select(selector)
      : d3_selection([[selector]]); // assume node
};

d3.selectAll = function(selector) {
  return typeof selector === "string"
      ? d3_selectionRoot.selectAll(selector)
      : d3_selection([selector]); // assume node[]
};

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bum-0.0.17 public/d3/src/core/selection-root.js
bum-0.0.16 public/d3/src/core/selection-root.js
bum-0.0.15 public/d3/src/core/selection-root.js
bum-0.0.14 public/d3/src/core/selection-root.js
bum-0.0.13 public/d3/src/core/selection-root.js
bum-0.0.12 public/d3/src/core/selection-root.js