(win: BrowserWindow)
| 341 | }; |
| 342 | |
| 343 | export const onWindow = (win: BrowserWindow) => { |
| 344 | modules.forEach((plugin) => { |
| 345 | if (plugin.onWindow) { |
| 346 | try { |
| 347 | plugin.onWindow(win); |
| 348 | } catch (e) { |
| 349 | notify('Plugin error!', `"${plugin._name}" has encountered an error. Check Developer Tools for details.`, { |
| 350 | error: e |
| 351 | }); |
| 352 | } |
| 353 | } |
| 354 | }); |
| 355 | }; |
| 356 | |
| 357 | // decorates the base entity by calling plugin[key] |
| 358 | // for all the available plugins |