MCPcopy Create free account
hub / github.com/breck7/scroll / onRemove

Function onRemove

external/.d3.js:2406–2420  ·  view source on GitHub ↗
(typename)

Source from the content-addressed store, hash-verified

2404}
2405
2406function onRemove(typename) {
2407 return function() {
2408 var on = this.__on;
2409 if (!on) return;
2410 for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {
2411 if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {
2412 this.removeEventListener(o.type, o.listener, o.options);
2413 } else {
2414 on[++i] = o;
2415 }
2416 }
2417 if (++i) on.length = i;
2418 else delete this.__on;
2419 };
2420}
2421
2422function onAdd(typename, value, options) {
2423 return function() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected