new SiteHeader(element, options)
- Source:
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
element |
HTMLElement | DOM element for component instantiation and scope |
||||||||||||||||||||||||||||||||||||||||||
options |
Object |
Properties
|
Classes
Methods
closeCustomAction()
- Description:
Hides the custom action overlay.
- Source:
closeOverlay()
- Description:
Hides the modal language list overlay.
- Source:
destroy()
- Description:
Destroy component.
- Source:
handleClickGlobal(e)
- Description:
Handles global click events, triggered outside of the site header.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
e |
Event |
handleKeyboardCustomAction(e)
- Description:
Handles keyboard events specific to the custom action toggle.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
e |
Event |
handleKeyboardGlobal(e)
- Description:
Handles global keyboard events, triggered outside of the site header.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
e |
Event |
handleKeyboardLanguage(e)
- Description:
Handles keyboard events specific to the language list.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
e |
Event |
handleNotificationClose()
- Description:
Removes the containers of the notification element
- Source:
handleResize()
- Description:
Trigger events on resize Uses a debounce, for performance
- Source:
init()
- Description:
Initialise component.
- Source:
openCustomAction()
- Description:
Shows the custom action overlay.
- Source:
openOverlay()
- Description:
Shows the modal language list overlay.
- Source:
setLanguageListHeight()
- Description:
Set a max height for the language list content
- Source:
toggleCustomAction(e)
- Description:
Toggles the custom action overlay.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
e |
Event |
toggleLogin(e)
- Description:
Toggles the login form.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
e |
Event |
toggleOverlay(e)
- Description:
Toggles the modal language list overlay.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
e |
Event |
toggleSearch(e)
- Description:
Toggles the search form.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
e |
Event |
updateOverlay()
- Description:
Wrapper: Update display of the modal language list overlay (Calls the new
updateOverlayPosition
for the language popover).
- Source:
updateOverlayPosition(overlay, toggle, arrowCssVar)
- Description:
Method repositions a popover overlay in the viewport. It also (optionally) handles language-list–specific logic such as columns.
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
overlay |
HTMLElement | The overlay element to be positioned |
|
toggle |
HTMLElement | The toggle button/link that opens the overlay |
|
arrowCssVar |
String |
--ecl-overlay-arrow-position
|
The CSS variable name for arrow positioning |
(static) autoInit(root) → {SiteHeader}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
root |
HTMLElement | DOM element for component instantiation and scope |
Returns:
An instance of SiteHeader.
- Type
- SiteHeader