Both sides previous revisionPrevious revision | |
custom:javascript:callbacks [2021/04/04 22:35] – Add more details to the event loop Deuce | custom:javascript:callbacks [2021/04/05 12:49] (current) – [Callback API] Deuce |
---|
| |
''js.addEventListener(eventName, callback)'' (returns an ID)\\ | ''js.addEventListener(eventName, callback)'' (returns an ID)\\ |
Installs a callback for the string ''eventName''. ''eventName'' is any string defined by the programmer. Care should be taken to ensure the string is unique to the use case and not generic to avoid conflicting with other libraries. | Installs a user callback for the string ''eventName''. ''eventName'' is any string defined by the programmer. Care should be taken to ensure the string is unique to the use case and not generic to avoid conflicting with other libraries. |
| |
''js.dispatchEvent(eventName[, thisObj])''\\ | ''js.dispatchEvent(eventName[, thisObj])''\\ |
Adds all callbacks which were installed with the specified ''eventName'' to the run queue. | Adds all user callbacks which were installed with the specified ''eventName'' to the run queue. |
| |
''js.setImmediate(callback[, thisObj])''\\ | ''js.setImmediate(callback[, thisObj])''\\ |