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

Method onLoad

packages/element-image/src/index.ts:394–402  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

392 }
393 } else {
394 const onLoad = () => {
395 // eslint-disable-next-line @typescript-eslint/no-use-before-define
396 off($image, EVENT_ERROR, onError);
397
398 // Ensure the image is fully rendered.
399 setTimeout(() => {
400 resolve($image);
401 });
402 };
403 const onError = () => {
404 off($image, EVENT_LOAD, onLoad);
405 reject(error);

Callers

nothing calls this directly

Calls 1

offFunction · 0.90

Tested by

no test coverage detected