appButton module
Provides APIs to interact with the app button part of the SDK.
Functions
is |
Checks if pages.appButton capability is supported by the host |
on |
Registers a handler for clicking the app button. Only one handler can be registered at a time. A subsequent registration replaces an existing registration. |
on |
Registers a handler for entering hover of the app button. Only one handler can be registered at a time. A subsequent registration replaces an existing registration. |
on |
Registers a handler for exiting hover of the app button. Only one handler can be registered at a time. A subsequent registration replaces an existing registration. |
Function Details
isSupported()
Checks if pages.appButton capability is supported by the host
function isSupported(): boolean
Returns
boolean
boolean to represent whether the pages.appButton capability is supported
onClick(handlerFunctionType)
Registers a handler for clicking the app button. Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
function onClick(handler: handlerFunctionType)
Parameters
- handler
- handlerFunctionType
The handler to invoke when the personal app button is clicked in the app bar.
onHoverEnter(handlerFunctionType)
Registers a handler for entering hover of the app button. Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
function onHoverEnter(handler: handlerFunctionType)
Parameters
- handler
- handlerFunctionType
The handler to invoke when entering hover of the personal app button in the app bar.
onHoverLeave(handlerFunctionType)
Registers a handler for exiting hover of the app button. Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
function onHoverLeave(handler: handlerFunctionType)
Parameters
- handler
- handlerFunctionType
The handler to invoke when exiting hover of the personal app button in the app bar.
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈