The cross tab feature enables reconciliation of events and state across multiple tabs running your application. It also exposes the underlying messaging layer for your own use. You can broadcast arbitrary messages to all tabs, regardless of their idle state.
The properties associated with the cross tab feature are:
- crossTab: Enables the cross tab feature.
- syncTimers: Syncs timeout durations between tabs when user activity is detected.
- name: Name of the idle timer instance. Set this if you are using crossTab with multiple instances on the same page.
- leaderElection: Enables the leader election feature.
- onMessage: Function called when a message is received.
The methods associated with the cross tab feature are:
- message(): Broadcast a message to all tabs.
- isLeader(): Returns whether or not the current tab is the elected leader.
- isLastActiveTab(): Returns whether or not the current tab is the last active tab.
- getTabId(): Returns the current tab's id.