Attach listeners that prettify the tab content upon its rendering
@param {oEvent} tab navigate event
@private
497043
function(oEvent) {
				// in our use-case each tab contains a single subSection => only this subSection needs to be processed
				var oSubSection = oEvent.getParameter("subSection"),
					sId = oSubSection.getId(),
					aBlocks;

				//attach listeners that prettify the tab content upon its rendering
				if (this._aVisitedTabs.indexOf(sId) < 0) { // avoid adding listeners to the same tab twice
					aBlocks = oSubSection.getBlocks();
					aBlocks.forEach(function(oBlock) {
						oBlock.addEventDelegate({"onAfterRendering": this._prettify.bind(this)});
					}.bind(this));

					this._aVisitedTabs.push(sId);
				}
			}
1139248
function navigate(oSource, aScopes, bForward) {
			if (!aScopes || aScopes.length == 0) {
				aScopes = [document];
			}

			if (!isContained(aScopes, oSource)) {
				return;
			}

			var oSouceGroup = findClosestGroup(oSource),
				$AllTabbables = filterStaticAreaContent(jQuery(aScopes).find(':sapTabbable').addBack(':sapTabbable'), aScopes),
				$FirstTabbableInScope = $AllTabbables.first(),
				$Tabbables = filterStaticAreaContent(findTabbables(oSource, aScopes, bForward), aScopes),
				oGroup, $Target;

			if (bForward) {
				//Find the first next tabbable within another group
				for (var i = 0; i < $Tabbables.length; i++) {
					oGroup = findClosestGroup($Tabbables[i]);
					if (oGroup != oSouceGroup) {
						$Target = jQuery($Tabbables[i]);
						break;
					}
				}

				//If not found, end of scope (e.g. page) is reached -> Focus the first tabbable scope (e.g. page) element
				if (!$Target || !$Target.length) {
					$Target = $FirstTabbableInScope;
				}
			} else {
				$Target = findFirstTabbableOfPreviousGroup($FirstTabbableInScope, $Tabbables, oSouceGroup, true);

				if (!$Target || !$Target.length) {
					//No other group found before -> find first element of last group in the scope (e.g. page)

					if ($AllTabbables.length == 1) {
						//Only one tabbable element -> use it
						$Target = jQuery($AllTabbables[0]);
					} else if ($AllTabbables.length > 1) {
						oSouceGroup = findClosestGroup($AllTabbables.eq(-1));
						oGroup = findClosestGroup($AllTabbables.eq(-2));
						if (oSouceGroup != oGroup) {
							//Last tabbable scope (e.g. page) element and the previous tabbable scope (e.g. page) element have different groups -> last tabbable scope (e.g. page) element is first tabbable element of its group
							$Target = $AllTabbables.eq(-1);
						} else {
							//Take last tabbable scope (e.g. page) element as reference and start search for first tabbable of the same group
							$Target = findFirstTabbableOfPreviousGroup($FirstTabbableInScope, $AllTabbables, oSouceGroup, false);
						}
					}
				}
			}

			if ($Target && $Target.length) {
				var oTarget = $Target[0],
					oEvent = null,
					oCustomGroup = findClosestCustomGroup(oTarget);

				if (oCustomGroup && oCustomGroup.id) {
					var oControl = sap.ui.getCore().byId(oCustomGroup.id);
					if (oControl) {
						oEvent = jQuery.Event("BeforeFastNavigationFocus");
						oEvent.target = oTarget;
						oEvent.source = oSource;
						oEvent.forward = bForward;
						oControl._handleEvent(oEvent);
					}
				}

				if (!oEvent || !oEvent.isDefaultPrevented()) {
					oTarget.focus();
				}
			}
		}
695603
function(tab) {
        tab = $(tab);

        var index = tab.data('tab-index'),
            section = this.sections.eq(index),
            options = this.options,
            url = this.readValue(tab, this.readOption(tab, 'getUrl'));

        this.fireEvent('showing', [this.index]);

        // Load content for AJAX requests
        if (url.substr(0, 10) !== 'javascript' && url.substr(0, 1) !== '#') {
            this.loadContent(url, { section: section });
        }

        // Toggle tabs
        this.tabs
            .aria('toggled', false)
            .removeClass('is-active');

        // Toggle sections
        if (index === this.index && options.collapsible) {
            if (section.is(':shown')) {
                section.conceal();

            } else {
                tab.aria('toggled', true).addClass('is-active');
                section.reveal();
            }
        } else {
            this.hide();

            tab.aria('toggled', true).addClass('is-active');
            section.reveal();
        }

        // Persist the state using a cookie
        if (options.persistState && $.cookie) {
            $.cookie('toolkit.tab.' + options.cookie, index, {
                expires: options.cookieDuration
            });
        }

        this.index = index;
        this.node = tab;

        this.fireEvent('shown', [index]);
    }
406635
function tab( event ) {

  // Find all focusable elements in the dialog card
  var focusable   = dialogEl.querySelectorAll('input:not([type=hidden]), textarea, select, button'),
      last        = focusable[focusable.length - 1],
      focused     = document.activeElement

  // If focused on the last focusable element, tab to the first element.
  if ( focused == last ) {
    if ( event ){ event.preventDefault() }
    focusable[0].focus()
  }

  // Focus on the last element if the focused element is not a child of the dialog
  if ( !focused || !toolbox.childOf( focused, dialogEl ) ) {
    last.focus()
  }
}
237812
public void onTabSelected(Tab tab, FragmentTransaction ft) {
		// Check if the fragment is already initialized
		if (mFragment == null) {
			// If not, instantiate and add it to the activity
			mFragment = Fragment.instantiate(mActivity, mClass.getName());
			ft.add(android.R.id.content, mFragment, mTag);
		} else {
			// If it exists, simply attach it in order to show it
			ft.attach(mFragment);
		}
	}
62556
function (tab) {
                var self = this, bar = self.get('bar'), body = self.get('body');
                bar.set('selectedTab', tab);
                body.set('selectedPanelIndex', util.indexOf(tab, bar.get('children')));
                return this;
            }
818166
function( id ) {
			var tab = this._.tabs[ id ] && this._.tabs[ id ][ 0 ];
			if ( !tab || this._.pageCount == 1 || !tab.isVisible() )
				return;
			// Switch to other tab first when we're hiding the active tab.
			else if ( id == this._.currentTabId )
				this.selectPage( getPreviousVisibleTab.call( this ) );

			tab.hide();
			this._.pageCount--;
			this.updateStyle();
		}
700491
function onTab(
    event: *,
    change: Change,
    editor: *,
    opts: Options
): void | Change {
    event.preventDefault();
    const { value } = change;
    const direction = event.shiftKey ? -1 : +1;

    // Create new row if needed
    const { startKey, selection } = value;
    const pos = TablePosition.create(opts, value.document, startKey);
    if (pos.isFirstCell() && direction === -1) {
        insertRow(opts, change, 0);
    } else if (pos.isLastCell() && direction === 1) {
        insertRow(opts, change);
    }

    // Move back to initial cell (insertRow moves selection automatically).
    change.select(selection);

    // Move
    moveSelectionBy(opts, change, direction, 0);

    // Select all cell.
    return selectAllText(change);
}
1278818
static void bindTabWithData(BottomNavigationItem bottomNavigationItem, BottomNavigationTab bottomNavigationTab, BottomNavigationBar bottomNavigationBar) {

        Context context = bottomNavigationBar.getContext();

        bottomNavigationTab.setLabel(bottomNavigationItem.getTitle(context));
        bottomNavigationTab.setIcon(bottomNavigationItem.getIcon(context));

        int activeColor = bottomNavigationItem.getActiveColor(context);
        int inActiveColor = bottomNavigationItem.getInActiveColor(context);

        if (activeColor != Utils.NO_COLOR) {
            bottomNavigationTab.setActiveColor(activeColor);
        } else {
            bottomNavigationTab.setActiveColor(bottomNavigationBar.getActiveColor());
        }

        if (inActiveColor != Utils.NO_COLOR) {
            bottomNavigationTab.setInactiveColor(inActiveColor);
        } else {
            bottomNavigationTab.setInactiveColor(bottomNavigationBar.getInActiveColor());
        }

        if (bottomNavigationItem.isInActiveIconAvailable()) {
            Drawable inactiveDrawable = bottomNavigationItem.getInactiveIcon(context);
            if (inactiveDrawable != null) {
                bottomNavigationTab.setInactiveIcon(inactiveDrawable);
            }
        }

        bottomNavigationTab.setItemBackgroundColor(bottomNavigationBar.getBackgroundColor());

        BadgeItem badgeItem = bottomNavigationItem.getBadgeItem();
        if (badgeItem != null) {
            badgeItem.bindToBottomTab(bottomNavigationTab);
        }
    }
832546
function tab(e) {
        var parentRole = getParentRole();

        if (parentRole == "tablist") {
          var elm = getFocusElements(focusedControl.getEl('body'))[0];

          if (elm) {
            elm.focus();
          }
        } else {
          moveFocus(e.shiftKey ? -1 : 1);
        }
      }
1102178
function Tab(tab, ctx) {
	if (tab) {
			var rippleContainer = document.createElement('span');
			u.addClass(rippleContainer,ctx._CssClasses.U_RIPPLE_CONTAINER);
			u.addClass(rippleContainer,ctx._CssClasses.U_JS_RIPPLE_EFFECT);
			var ripple = document.createElement('span');
			u.addClass(ripple,ctx._CssClasses.U_RIPPLE);
			rippleContainer.appendChild(ripple);
			tab.appendChild(rippleContainer);

      tab.ripple = new u.Ripple(tab)


		tab.addEventListener('click', function(e) {
			u.stopEvent(e);
			// e.preventDefault();
			var href = tab.href.split('#')[1];
			var panel = ctx.element.querySelector('#' + href);
			ctx.resetTabState_();
			ctx.resetPanelState_();
			u.addClass(tab,ctx._CssClasses.ACTIVE_CLASS);
			u.addClass(panel,ctx._CssClasses.ACTIVE_CLASS);
		});

	}
}
300114
function insertTab (tabData, index) {
    var hasLoaded = loaded;
    var proto = {
          getIndex:     function () { return ctrl.tabs.indexOf(tab); },
          isActive:     function () { return this.getIndex() === ctrl.selectedIndex; },
          isLeft:       function () { return this.getIndex() < ctrl.selectedIndex; },
          isRight:      function () { return this.getIndex() > ctrl.selectedIndex; },
          shouldRender: function () { return !ctrl.noDisconnect || this.isActive(); },
          hasFocus:     function () {
            return ctrl.styleTabItemFocus
                && ctrl.hasFocus && this.getIndex() === ctrl.focusIndex;
          },
          id:           $mdUtil.nextUid(),
          hasContent: !!(tabData.template && tabData.template.trim())
    };
    var tab = angular.extend(proto, tabData);

    if (angular.isDefined(index)) {
      ctrl.tabs.splice(index, 0, tab);
    } else {
      ctrl.tabs.push(tab);
    }
    processQueue();
    updateHasContent();

    $mdUtil.nextTick(function () {
      updatePagination();
      setAriaControls(tab);

      // if autoselect is enabled, select the newly added tab
      if (hasLoaded && ctrl.autoselect) {
        $mdUtil.nextTick(function () {
          $mdUtil.nextTick(function () { select(ctrl.tabs.indexOf(tab)); });
        });
      }
    });
    return tab;
  }
1341013
function ( options ) {

		// Feature test before initializing
		if ( 'querySelector' in document && 'addEventListener' in window && Array.prototype.forEach ) {

			// Selectors and variables
			options = _mergeObjects( _defaults, options || {} ); // Merge user options with defaults
			var toggles = document.querySelectorAll('[data-scroll]'); // Get smooth scroll toggles

			// When a toggle is clicked, run the click handler
			Array.prototype.forEach.call(toggles, function (toggle, index) {
				toggle.addEventListener('click', animateScroll.bind( null, toggle, toggle.getAttribute('href'), options ), false);
			});

		}

	}
883690
function tabChanged() {
    var url = getCanonicalUrl(tabs.activeTab.url);
    widget.port.emit('update', {
      'enabled': url.length ? isInjectionEnabledForUrl(url) : false
    });
  }
215456
function() {
            if ( consoleWindow ) {

                // Set notes to next steps notes.
                var newNotes = document.querySelector( '.active' ).querySelector( '.notes' );
                if ( newNotes ) {
                    newNotes = newNotes.innerHTML;
                } else {
                    newNotes = lang.noNotes;
                }
                consoleWindow.document.getElementById( 'notes' ).innerHTML = newNotes;

                // Set the views
                var baseURL = document.URL.substring( 0, document.URL.search( '#/' ) );
                var slideSrc = baseURL + '#' + document.querySelector( '.active' ).id;
                var preSrc = baseURL + '#' + nextStep().id;
                var slideView = consoleWindow.document.getElementById( 'slideView' );

                // Setting them when they are already set causes glithes in Firefox, so check first:
                if ( slideView.src !== slideSrc ) {
                    slideView.src = slideSrc;
                }
                var preView = consoleWindow.document.getElementById( 'preView' );
                if ( preView.src !== preSrc ) {
                    preView.src = preSrc;
                }

                consoleWindow.document.getElementById( 'status' ).innerHTML =
                    '<span class="moving">' + lang.moving + '</span>';
            }
        }
833349
function( contentItem ) {
		var i, j, isActive, activeTab;

		if (this.activeContentItem === contentItem) return;
		
		for( i = 0; i < this.tabs.length; i++ ) {
			isActive = this.tabs[ i ].contentItem === contentItem;
			this.tabs[ i ].setActive( isActive );
			if( isActive === true ) {
				this.activeContentItem = contentItem;
				this.parent.config.activeItemIndex = i;
			}
		}

		if (this.layoutManager.config.settings.reorderOnTabMenuClick) {
			/**
			 * If the tab selected was in the dropdown, move everything down one to make way for this one to be the first.
			 * This will make sure the most used tabs stay visible.
			 */
			if (this._lastVisibleTabIndex !== -1 && this.parent.config.activeItemIndex > this._lastVisibleTabIndex) {
				activeTab = this.tabs[this.parent.config.activeItemIndex];
				for ( j = this.parent.config.activeItemIndex; j > 0; j-- ) {
					this.tabs[j] = this.tabs[j - 1];
				}
				this.tabs[0]                       = activeTab;
				this.parent.config.activeItemIndex = 0;
			}
		}

		this._updateTabSizes();
		this.parent.emitBubblingEvent( 'stateChanged' );
	}
31889
public function renderView()
    {
        if ($this->path) {
            $this->js(true)->tab(
                ['cache' => false, 'auto' => true, 'path' => $this->path, 'apiSettings' => ['data' => ['__atk_tab' => 1]]]
            );
        } else {
            $this->js(true)->tab();
        }

        if ($this->owner->activeTabName == $this->name) {
            $this->js(true)->click();
        }

        parent::renderView();
    }