* Send a notification to all modules. * @param {string} notification The identifier of the notification. * @param {object} payload The payload of the notification. * @param {Module} sender The module that sent the notification. * @param {Module} [sendTo] The (optional) module to send the notific
(notification, payload, sender, sendTo)
| 103 | * @param {Module} [sendTo] The (optional) module to send the notification to. |
| 104 | */ |
| 105 | function _sendNotification (notification, payload, sender, sendTo) { |
| 106 | for (const m in modules) { |
| 107 | const module = modules[m]; |
| 108 | if (module !== sender && (!sendTo || module === sendTo)) { |
| 109 | module.notificationReceived(notification, payload, sender); |
| 110 | } |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | /** |
| 115 | * Update the dom for a specific module. |
no test coverage detected