Methods
(static) dismiss() → {void}
Dismiss the notification: fade out and release focus
- Type:
- void
(static) hide() → {void}
Hide the notification without triggering "dismissed" action. Used when OSD opens to temporarily pause the notification so it can be re-shown later.
- Type:
- void
(static) init() → {void}
- Type:
- void
(static) onActionButtonReady() → {void}
Reposition when TextButton finishes rendering with its actual width
- Type:
- void
(static) onAutoDismissTimerFired() → {void}
- Type:
- void
(static) onDestroy() → {void}
Clean up all references and observers
- Type:
- void
(static) onFadeOutAnimationState() → {void}
Called when fade-out animation state changes. Guard with m.top.state = "dismissing" so externally stopped animations (e.g., show() interrupting a fade-out) don't incorrectly transition to hidden.
- Type:
- void
(static) onKeyEvent(key, press) → {boolean}
| Name | Type | Description |
|---|---|---|
key | string | |
press | boolean |
- Type:
- boolean
(static) onTextChanged() → {void}
- Type:
- void
(static) positionBottomRight() → {void}
Position the notification button in the bottom-right corner with 5% safe zone
- Type:
- void
(static) show() → {void}
Show the notification: position bottom-right with 5% safe zone, fade in, set focus. Safe to call while already showing — restarts the auto-dismiss timer and repositions for updated text/autoDismissSeconds (e.g. contiguous segment transitions).
- Type:
- void