Skip to content

Module: rendering::TaskList

Jovan Gerodetti edited this page Apr 14, 2021 · 4 revisions

TaskList

exported: default
kind: object
declaration: const

Properties

tasks

Type: id: *, work: Function
kind: value

registeredIds

Type: Array
kind: value

last

Type: id: *, work: Function
kind: value

length

Type: number
kind: value

Methods

constructor() => {TaskList}

kind: function

Render TaskList to manage rendertaks and optionally track duplicates by ids.

push(task, [id]) => {undefined}

kind: function

adds a new item to the task list.

Name Type Description
task Function the task to add to the list
[id] * the id of this tasks. If provided no task with the same id can be added again.

unshift(task, [id=null]) => {undefined}

kind: function

adds a new task to the beginning of the list

Name Type Description
task Function
[id=null] *

flush() => {undefined}

kind: function

clears the task list

filter(callback) => {undefined}

kind: function

Filters out tasks that do not satisfy the condition.

Name Type Description
callback Function

run(args) => {undefined}

kind: function

Runs all tasks but keeps tasks, which didn't complete, in the list.

Name Type Description
args ...* arguments for the task execution

getAll() => {?}

kind: function

Clone this wiki locally