* Helper method to load all dependencies. * @param {string} funcName Function name to call to get scripts or styles. * @returns {Promise }
(funcName)
| 277 | * @returns {Promise<void>} |
| 278 | */ |
| 279 | async loadDependencies (funcName) { |
| 280 | let dependencies = this[funcName](); |
| 281 | |
| 282 | const loadNextDependency = async () => { |
| 283 | if (dependencies.length > 0) { |
| 284 | const nextDependency = dependencies[0]; |
| 285 | await Loader.loadFileForModule(nextDependency, this); |
| 286 | dependencies = dependencies.slice(1); |
| 287 | await loadNextDependency(); |
| 288 | } else { |
| 289 | return Promise.resolve(); |
| 290 | } |
| 291 | }; |
| 292 | |
| 293 | await loadNextDependency(); |
| 294 | } |
| 295 | |
| 296 | /** |
| 297 | * Load all translations. |
no outgoing calls
no test coverage detected