SiteHeader

SiteHeader

Source:
Parameters:
Name Type Description
element HTMLElement

DOM element for component instantiation and scope

options Object
Properties
Name Type Description
languageLinkSelector String
languageListOverlaySelector String
languageListEuSelector String
languageListNonEuSelector String
closeOverlaySelector String
searchToggleSelector String
searchFormSelector String
loginToggleSelector String
loginBoxSelector String
tabletBreakpoint integer
attachClickListener Boolean

Whether or not to bind click events

attachKeyListener Boolean

Whether or not to bind keyboard events

attachResizeListener Boolean

Whether or not to bind resize events

Classes

SiteHeader

Methods

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

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:

openOverlay()

Description:
  • Shows the modal language list overlay.

Source:

setLanguageListHeight()

Description:
  • Set a max height for the language list content

Source:

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:
  • Update display of the modal language list overlay.

Source:

(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