bn.onTabSwitched
▸ onTabSwitched(cb
): void
description
listen tab item switch event
example
bn.onTabSwitched((params) => {
console.log('tab swtiched: ', params);
});
Parameters
Name | Type |
---|---|
cb | TabSwtichedCallback |
Returns
void
TabSwtichedCallback
Ƭ TabSwtichedCallback: (data
: TabSwitchedEventData
) => void
| Promise
<void
>
Type declaration
▸ (data
): void
| Promise
<void
>
Parameters
Name | Type |
---|---|
data | TabSwitchedEventData |
Returns
void
| Promise
<void
>
TabSwitchedEventData
Ƭ TabSwitchedEventData: Object
Type declaration
Name | Type | Description |
---|---|---|
type | "api" | "tap" | Action Types: - api : triggered by an bn.switchTab call. - tap : triggered by a manual click. |
pagePath | string | - |
query | string | - |