Update README.md

This commit is contained in:
tripathyr 2021-12-29 17:27:02 +05:30 committed by GitHub
parent ae82e254d2
commit f426875692
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -836,6 +836,14 @@ Sample startup is defined in onLoadStartUp function
2. fn - body of the function
Note: startup funtions are called in parallel. Therefore only add custom startup funtion only if it can run in parallel with other startup functions. (default startup funtions are read supernode list and subAdmin list from blockchain API, load data from indexedDB, get login credentials)
```javascript
//Executes automatically on startup before anything else executes
floDapps.addStartUpFunction("myFirstFunction",function (){ return new Promise ((resolve,reject)=>{console.log("First function Excecuted before everything else");resolve("My First Function executed")}); });
// Manaul execution on console
floDapps.util.startUpFunctions.myFirstFunction();
```
### Advanced Dapp functions usually not needed for users
#### setAppObjectStores