MCPcopy Index your code
hub / github.com/UI5/webcomponents / run

Method run

packages/base/src/animations/AnimationQueue.ts:17–30  ·  view source on GitHub ↗
(element: HTMLElement, task: TaskType)

Source from the content-addressed store, hash-verified

15 }
16
17 static run(element: HTMLElement, task: TaskType): Promise<void> {
18 if (!tasks.has(element)) {
19 tasks.set(element, []);
20 }
21
22 return task().then(() => {
23 const elementTasks = tasks.get(element);
24
25 if (elementTasks!.length > 0) {
26 return AnimationQueue.run(element, elementTasks!.shift()!);
27 }
28 tasks.delete(element);
29 });
30 }
31
32 static push(element: HTMLElement, task: TaskType) {
33 const elementTasks = tasks.get(element);

Callers 2

drainQueueFunction · 0.80
pushMethod · 0.80

Calls 2

getMethod · 0.80
shiftMethod · 0.80

Tested by

no test coverage detected