getWidgetUrl(mode = undefined) {
    const url = /** @type {string|undefined} */ (
        this.config_.get('widgetUrl')) ||
        // If no widget URL is provided, use the current one.
        util.getCurrentUrl();
    return this.widgetUrlForMode_(url, mode);
  }
Gets the widget URL for a specific mode.
If the 'widgetUrl' configuration is not set, current URL is used as the
base URL for the widget.
@param {?Config.WidgetMode=} mode The mode for the widget.
@return {string} The URL of the callback widget.