MCPcopy
hub / github.com/fengyuanchen/cropperjs / on

Function on

packages/utils/src/functions.ts:144–153  ·  view source on GitHub ↗
(
  target: EventTarget,
  types: string,
  listener: EventListenerOrEventListenerObject,
  options?: AddEventListenerOptions,
)

Source from the content-addressed store, hash-verified

142 * @param {AddEventListenerOptions} [options] The options specify characteristics about the event listener.
143 */
144export function on(
145 target: EventTarget,
146 types: string,
147 listener: EventListenerOrEventListenerObject,
148 options?: AddEventListenerOptions,
149): void {
150 types.trim().split(REGEXP_SPACES).forEach((type) => {
151 target.addEventListener(type, listener, options);
152 });
153}
154
155/**
156 * Add once event listener to the event target.

Callers 8

connectedCallbackMethod · 0.90
index.spec.tsFile · 0.90
connectedCallbackMethod · 0.90
connectedCallbackMethod · 0.90
connectedCallbackMethod · 0.90
$bindMethod · 0.90
onceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected