MCPcopy
hub / github.com/microsoft/SandDance / remove

Method remove

docs/app/js/sanddance-app.js:95083–95095  ·  view source on GitHub ↗
(type, handler)

Source from the content-addressed store, hash-verified

95081 entries.splice(insertPosition + 1, 0, entry);
95082 }
95083 remove(type, handler) {
95084 const { handlers , handlersByElement } = this;
95085 for(let i = handlers.length - 1; i >= 0; i--){
95086 const entry = handlers[i];
95087 if (entry.type === type && entry.handler === handler) {
95088 handlers.splice(i, 1);
95089 const entries = handlersByElement.get(entry.srcElement);
95090 entries.splice(entries.indexOf(entry), 1);
95091 if (entries.length === 0) handlersByElement.delete(entry.srcElement);
95092 }
95093 }
95094 this._active = handlers.some((entry)=>!entry.passive);
95095 }
95096 /**
95097 * Invoke handlers on a particular element
95098 */ _emit(event, srcElement) {

Callers 15

_emitMethod · 0.95
conditionalHeaderFunction · 0.45
setupbase.pyFile · 0.45
_get_filesFunction · 0.45
main.jsFile · 0.45
conditionalHeaderFunction · 0.45
enableBodyScrollFunction · 0.45
setFocusVisibilityFunction · 0.45
sanddance-app.jsFile · 0.45
_removeEventHandlerMethod · 0.45
marshallFunction · 0.45
detachFunction · 0.45

Calls 2

getMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected