- Description:
The collapsable section events.
This module wraps the standard bootstrap collapsable events, but for collapsable sections.
- Source:
- Copyright:
- 2024 Ferran Recio
- 2024 Ferran Recio
- License:
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
The collapsable section events.
This module wraps the standard bootstrap collapsable events, but for collapsable sections.
Example
Example of listening to a collapsable section events.
import {eventTypes as collapsableSectionEventTypes} from 'core/local/collapsable_section/events';
document.addEventListener(collapsableSectionEventTypes.shown, event => {
window.console.log(event.target); // The HTMLElement relating to the block whose content was updated.
});
Members
(static, constant) eventTypes
- Description:
Events for
core_block
.
- Source:
Properties:
Name | Type | Description |
---|---|---|
blockContentUpdated |
String |
Events for core_block
.
Methods
(inner) notifyBlockContentUpdated(element) → {CustomEvent}
- Description:
Trigger an event to indicate that the content of a block was updated.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
element |
HTMLElement | The HTMLElement containing the updated block. |
Fires:
Returns:
- Type
- CustomEvent
(inner) notifyBlockContentUpdated(element) → {CustomEvent}
- Description:
Trigger an event to indicate that the content of a block was updated.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
element |
HTMLElement | The HTMLElement containing the updated block. |
Fires:
Returns:
- Type
- CustomEvent
Events
blockContentUpdated
- Description:
An event triggered when the content of a block has changed.
- Source:
Properties:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
target |
HTMLElement | The block element that was updated |
||||||
detail |
object |
Properties
|
Type:
- CustomEvent