On Wed, Feb 27, 2008 at 10:46 AM, <[EMAIL PROTECTED]> wrote:

> Author: zhen
> Date: Wed Feb 27 10:46:10 2008
> New Revision: 631674
>
> URL: http://svn.apache.org/viewvc?rev=631674&view=rev
> Log:
> Legacy support for _IG_Tabs.prototype.addTab(tabName, opt_domId,
> opt_callback).
>
>
> Modified:
>    incubator/shindig/trunk/features/tabs/tabs.js
>
> Modified: incubator/shindig/trunk/features/tabs/tabs.js
> URL:
> http://svn.apache.org/viewvc/incubator/shindig/trunk/features/tabs/tabs.js?rev=631674&r1=631673&r2=631674&view=diff
>
> ==============================================================================
> --- incubator/shindig/trunk/features/tabs/tabs.js (original)
> +++ incubator/shindig/trunk/features/tabs/tabs.js Wed Feb 27 10:46:10 2008
> @@ -190,6 +190,11 @@
>  * @return {String} DOM id of the tab container.
>  */
>  gadgets.TabSet.prototype.addTab = function(tabName, opt_params) {


It would be great if we could move this change into the legacy only version
because it isn't documented in the spec. It looks like we already do that
with addDynamic tab, so something like

newAddTabFunction = _IG_Tabs.prototype.addTab

_IG_Tabs.prototype.addTab = function(tabName, callback) {
  // legacy translation code you wrote
  return newTabFunction(...);
};

What do you think?


> +  // Legacy support
> +  if (typeof opt_params === 'string') {
> +    opt_params = {contentContainer: arguments[1], callback:
> arguments[2]};
> +  }
> +
>   var params = opt_params || {};
>
>   var tabIndex = -1;
>
>
>

Reply via email to