Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • Parameters

    • root: Element
    • Optional foundation: FoundationType
    • Rest ...args: Array<unknown>

    Returns MDCSnackbar

Properties

Protected foundation_

Protected root_

root_: Element

Accessors

actionButtonText

  • get actionButtonText(): string
  • set actionButtonText(actionButtonText: string): void

closeOnEscape

  • get closeOnEscape(): boolean
  • set closeOnEscape(closeOnEscape: boolean): void

isOpen

  • get isOpen(): boolean

labelText

  • get labelText(): string
  • set labelText(labelText: string): void

timeoutMs

  • get timeoutMs(): number
  • set timeoutMs(timeoutMs: number): void

Methods

close

  • close(reason?: string): void
  • Parameters

    • Default value reason: string = ""

      Why the snackbar was closed. Value will be passed to CLOSING_EVENT and CLOSED_EVENT via the event.detail.reason property. Standard values are REASON_ACTION and REASON_DISMISS, but custom client-specific values may also be used if desired.

    Returns void

destroy

  • destroy(): void

emit

  • emit<T>(evtType: string, evtData: T, shouldBubble?: boolean): void
  • Fires a cross-browser-compatible custom event from the component root of the given type, with the given data.

    Type parameters

    • T: object

    Parameters

    • evtType: string
    • evtData: T
    • Default value shouldBubble: boolean = false

    Returns void

getDefaultFoundation

initialSyncWithDOM

  • initialSyncWithDOM(): void

initialize

listen

  • Wrapper method to add an event listener to the component's root element. This is most useful when listening for custom events.

    Type parameters

    Parameters

    Returns void

  • Type parameters

    • E: Event

    Parameters

    Returns void

open

  • open(): void

unlisten

  • Wrapper method to remove an event listener to the component's root element. This is most useful when unlistening for custom events.

    Type parameters

    Parameters

    Returns void

  • Type parameters

    • E: Event

    Parameters

    Returns void

Static attachTo

Generated using TypeDoc