- Description:
Handle forum subscription/tracking toggling.
- Source:
- Copyright:
- 2025 Sara Arjona
- 2025 Sara Arjona
- License:
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Handle forum subscription/tracking toggling.
Members
(static, constant) init
- Description:
Initialize the forum overview toggle functionality.
- Source:
Initialize the forum overview toggle functionality.
Methods
(inner) registerEventListeners(toggleElement)
- Description:
Register event listeners for the subscription/tracking toggles in the overview.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
toggleElement |
HTMLElement | The toggle root element |
(async, inner) subscriptionToggleClickHandler(toggleElement) → {Promise.<void>}
- Description:
Toggle subscription element click handler.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
toggleElement |
HTMLElement | The toggle element that was clicked |
Returns:
- Type
- Promise.<void>
(async, inner) trackToggleClickHanldler(toggleElement) → {Promise.<void>}
- Description:
Toggle track element click handler.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
toggleElement |
HTMLElement | The toggle element that was clicked |
Returns:
- Type
- Promise.<void>
(async, inner) updateSwitchState(toggleElement, newTargetState, stringKey) → {Promise.<void>}
- Description:
Update the switch state of the toggle element.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
toggleElement |
HTMLElement | The toggle element to update |
newTargetState |
Boolean | The new target state to set (true for subscribed, false for unsubscribed) |
stringKey |
string | The string key to retrieve the label text |
Returns:
- Type
- Promise.<void>