MCPcopy Create free account
hub / github.com/OpenIntroStat/ims / elementData

Function elementData

libs/htmlwidgets-1.5.3/htmlwidgets.js:118–128  ·  view source on GitHub ↗
(el, name, value)

Source from the content-addressed store, hash-verified

116
117 // Implement a vague facsimilie of jQuery's data method
118 function elementData(el, name, value) {
119 if (arguments.length == 2) {
120 return el["htmlwidget_data_" + name];
121 } else if (arguments.length == 3) {
122 el["htmlwidget_data_" + name] = value;
123 return el;
124 } else {
125 throw new Error("Wrong number of arguments for elementData: " +
126 arguments.length);
127 }
128 }
129
130 // http://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex
131 function escapeRegExp(str) {

Callers 1

htmlwidgets.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected