source: node_modules/d3-selection/src/selection/html.js@ e4c61dd

Last change on this file since e4c61dd was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Prototype 1.1

  • Property mode set to 100644
File size: 520 bytes
RevLine 
[e4c61dd]1function htmlRemove() {
2 this.innerHTML = "";
3}
4
5function htmlConstant(value) {
6 return function() {
7 this.innerHTML = value;
8 };
9}
10
11function htmlFunction(value) {
12 return function() {
13 var v = value.apply(this, arguments);
14 this.innerHTML = v == null ? "" : v;
15 };
16}
17
18export default function(value) {
19 return arguments.length
20 ? this.each(value == null
21 ? htmlRemove : (typeof value === "function"
22 ? htmlFunction
23 : htmlConstant)(value))
24 : this.node().innerHTML;
25}
Note: See TracBrowser for help on using the repository browser.