updateDestination_(destination) {
      assert(destination.constructor !== Array, 'Single printer expected');
      destination.capabilities =
          localizeCapabilities(assert(destination.capabilities));
      if (print_preview.originToType(destination.origin) !==
          print_preview.PrinterType.LOCAL_PRINTER) {
        destination.capabilities = sortMediaSizes(destination.capabilities);
      }
      const existingDestination =
          this.destinationMap_[this.getKey_(destination)];
      if (existingDestination != null) {
        existingDestination.capabilities = destination.capabilities;
      } else {
        this.insertDestination_(destination);
      }

      if (this.selectedDestination_ &&
          (existingDestination == this.selectedDestination_ ||
           destination == this.selectedDestination_)) {
        this.sendSelectedDestinationUpdateEvent_();
      }
    }
/**
     * Updates an existing print destination with capabilities and display name
     * information. If the destination doesn't already exist, it will be added.
     * @param {!print_preview.Destination} destination Destination to update.
     * @private
     */
Updates an existing print destination with capabilities and display name
information. If the destination doesn't already exist, it will be added.
@param {!print_preview.Destination} destination Destination to update.
@private
Updates an existing print destination with capabilities and display name information . If the destination doesn ' t already exist it will be added . @param { !print_preview . Destination } destination Destination to update . @private
updateDestination_(destination) {
      assert(destination.constructor !== Array, 'Single printer expected');
      destination.capabilities =
          localizeCapabilities(assert(destination.capabilities));
      if (print_preview.originToType(destination.origin) !==
          print_preview.PrinterType.LOCAL_PRINTER) {
        destination.capabilities = sortMediaSizes(destination.capabilities);
      }
      const existingDestination =
          this.destinationMap_[this.getKey_(destination)];
      if (existingDestination != null) {
        existingDestination.capabilities = destination.capabilities;
      } else {
        this.insertDestination_(destination);
      }
      if (this.selectedDestination_ &&
          (existingDestination == this.selectedDestination_ ||
           destination == this.selectedDestination_)) {
        this.sendSelectedDestinationUpdateEvent_();
      }
    }
updateDestination_ ( destination ) { assert ( destination . constructor !== Array , 'Single printer expected' ) ; destination . capabilities = localizeCapabilities ( assert ( destination . capabilities ) ) ; if ( print_preview . originToType ( destination . origin ) !== print_preview . PrinterType . LOCAL_PRINTER ) { destination . capabilities = sortMediaSizes ( destination . capabilities ) ; } const existingDestination = this . destinationMap_ [ this . getKey_ ( destination ) ] ; if ( existingDestination != null ) { existingDestination . capabilities = destination . capabilities ; } else { this . insertDestination_ ( destination ) ; } if ( this . selectedDestination_ && ( existingDestination == this . selectedDestination_ || destination == this . selectedDestination_ ) ) { this . sendSelectedDestinationUpdateEvent_ ( ) ; } }
Updates an existing print destination with capabilities and display name
 information.
Updates an existing print destination with capabilities and display name information .