PageSourceSearch

https://scad.gov.ae/o/frontend-js-web/liferay/dom_task_runner.js

js scad.gov.ae collected 2026-10-02 07:18:29 UTC 1,168 bytes, 57 lines download raw bytes

1/**
2 * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
3 * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
4 */
5
6(function () {
7	const DOMTaskRunner = {
8		_scheduledTasks: [],
9
10		_taskStates: [],
11
12		addTask(task) {
13			const instance = this;
14
15			instance._scheduledTasks.push(task);
16		},
17
18		addTaskState(state) {
19			const instance = this;
20
21			instance._taskStates.push(state);
22		},
23
24		reset() {
25			const instance = this;
26
27			instance._taskStates.length = 0;
28			instance._scheduledTasks.length = 0;
29		},
30
31		runTasks(node) {
32			const instance = this;
33
34			const scheduledTasks = instance._scheduledTasks;
35			const taskStates = instance._taskStates;
36
37			const tasksLength = scheduledTasks.length;
38			const taskStatesLength = taskStates.length;
39
40			for (let i = 0; i < tasksLength; i++) {
41				const task = scheduledTasks[i];
42
43				const taskParams = task.params;
44
45				for (let j = 0; j < taskStatesLength; j++) {
46					const state = taskStates[j];
47
48					if (task.condition(state, taskParams, node)) {
49						task.action(state, taskParams, node);
50					}
51				}
52			}
53		},
54	};
55
56	Liferay.DOMTaskRunner = DOMTaskRunner;
57})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.