* Allows a creative to set the callback function for when the resize * request returns a success. The callback should be set before resizeAd * is ever called. * @param {function(number, number)} callback Function to call if the resize * request succeeds.
(callback)
| 276 | * request succeeds. |
| 277 | */ |
| 278 | onResizeSuccess(callback) { |
| 279 | this.client_.registerCallback( |
| 280 | MessageType_Enum.EMBED_SIZE_CHANGED, |
| 281 | (obj) => { |
| 282 | callback(obj['requestedHeight'], obj['requestedWidth']); |
| 283 | } |
| 284 | ); |
| 285 | this.sendDeprecationNotice_('onResizeSuccess'); |
| 286 | } |
| 287 | |
| 288 | /** |
| 289 | * Allows a creative to set the callback function for when the resize |
no test coverage detected