MCPcopy Index your code
hub / github.com/nodejs/node / preventDefault

Method preventDefault

lib/internal/event_target.js:180–185  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

178 }
179
180 preventDefault() {
181 if (!isEvent(this))
182 throw new ERR_INVALID_THIS('Event');
183 if (!this.#cancelable || this[kInPassiveListener]) return;
184 this.#defaultPrevented = true;
185 }
186
187 /**
188 * @type {EventTarget}

Callers 15

handlerFunction · 0.80
listenerFunction · 0.80
handlerFunction · 0.80
setupListenersFunction · 0.80
testharness.jsFile · 0.80
rejectHandlerFunction · 0.80
handleChangeMethod · 0.80
handleDragOverMethod · 0.80

Calls 1

isEventFunction · 0.85

Tested by

no test coverage detected