* Sends a message to all subscribed windows. * @param {string} type Type of the message. * @param {!JsonObject} data Message payload.
(type, data)
| 472 | * @param {!JsonObject} data Message payload. |
| 473 | */ |
| 474 | send(type, data) { |
| 475 | // Remove clients that have been removed from the DOM. |
| 476 | remove(this.clientWindows_, (client) => !client.win.parent); |
| 477 | postMessageToWindows( |
| 478 | this.iframe_, |
| 479 | this.clientWindows_, |
| 480 | type, |
| 481 | data, |
| 482 | this.is3p_ |
| 483 | ); |
| 484 | } |
| 485 | |
| 486 | /** |
| 487 | * Destroys iframe. |
no test coverage detected