19
waitForReplicants.md
Normal file
19
waitForReplicants.md
Normal file
@ -0,0 +1,19 @@
|
||||
(static) waitForReplicants(replicants) → {Promise.<any>}
|
||||
Lets you easily wait for a group of Replicants to finish declaring.
|
||||
Returns a promise which is resolved once all provided Replicants have emitted a change event, which is indicates that they must have finished declaring.
|
||||
This method is only useful in client-side code. Server-side code never has to wait for Replicants.
|
||||
#Parameters
|
||||
Name Type Description
|
||||
replicants Replicant
|
||||
#Example
|
||||
From a graphic or dashboard panel:
|
||||
Copy
|
||||
const rep1 = nodecg.Replicant('rep1');
|
||||
const rep2 = nodecg.Replicant('rep2');
|
||||
|
||||
// You can provide as many Replicant arguments as you want,
|
||||
// this example just uses two Replicants.
|
||||
NodeCG.waitForReplicants(rep1, rep2).then(() => {
|
||||
console.log('rep1 and rep2 are fully declared and ready to use!');
|
||||
});
|
||||
Willkommen im Wiki.
|
||||
Reference in New Issue
Block a user