Sha256: 035095d511c8560878dc4df60008aca9a82c1b2b3b3d7d2f57312821949c82de

Contents?: true

Size: 526 Bytes

Versions: 6

Compression:

Stored size: 526 Bytes

Contents

// TODO insert(node, function)?
// TODO insert(function, string)?
// TODO insert(function, function)?
d3_selectionPrototype.insert = function(name, before) {
  name = d3.ns.qualify(name);

  function insert() {
    return this.insertBefore(
        document.createElement(name),
        d3_select(before, this));
  }

  function insertNS() {
    return this.insertBefore(
        document.createElementNS(name.space, name.local),
        d3_select(before, this));
  }

  return this.select(name.local ? insertNS : insert);
};

Version data entries

6 entries across 6 versions & 1 rubygems

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