Options
All
  • Public
  • Public/Protected
  • All
Menu
element

livelike-widgets

Hierarchy

  • LitElement
    • LiveLikeWidgets

Index

Constructors

constructor

Properties

authors

authors: boolean = false

Add to element to enabled listing the widget author tag in timeline mode

customTemplateRenderer

customTemplateRenderer: CustomWidgetRenderer

customWidgetRenderer

customWidgetRenderer: CustomWidgetRenderer

dataId

dataId: string = ...

dateTimeFormatter

dateTimeFormatter: (__namedParameters: Object) => string = formatDateTime

Type declaration

    • (__namedParameters: Object): string
    • Formats timestamp

      since

      2.43.0

      argument

      object of type {time, format, lang}

      Parameters

      • __namedParameters: Object

      Returns string

hasWidgetAttached

hasWidgetAttached: boolean = false

hide_dismiss_button

hide_dismiss_button: boolean = false

Boolean to toggle displaying the widget's dismiss button

lang

lang: any

Sets language code

loaded

loaded: boolean = false

If the element has loaded

mode

mode: string = 'pop-up'

The mode of the element. Either "pop-up" or "timeline". Default is "pop-up"

programid

programid: any

The id of the program to load the element with

queue

queue: any

reactions

reactions: boolean = false

If true, widget reactions are shown once widget is not longer in 'ready' or 'interactive' phase

syncStrategy

syncStrategy: any

timeformat

timeformat: { day: string; hour: string; minute: string; month: string; year: string } = ...

Object containing time formatting properties.

Type declaration

  • day: string
  • hour: string
  • minute: string
  • month: string
  • year: string

timestamps

timestamps: boolean = false

Add to element to enabled listing the widget timestamps tag in timeline mode

updating

updating: boolean = false

Methods

afterWidgetsLoaded

  • afterWidgetsLoaded(__namedParameters: Object): Promise<void>
  • Parameters

    • __namedParameters: Object

    Returns Promise<void>

attach

  • attach(widgetEl: Widget, position: "prepend" | "append"): Promise<void>
  • async

    Attaches widget to DOM. Fires widgetattached events.

    fires

    widgetattached

    Parameters

    • widgetEl: Widget
    • position: "prepend" | "append"

    Returns Promise<void>

createSyncWidget

  • Creates and queues widget from widget id and kind. Displays widget according to syncStrategy.

    see

    https://docs.livelike.com/docs/web-spoiler-free-sync

    since

    1.18.0

    example
    const widgetEl = document.querySelector('livelike-widgets')\n
    widgetEl.createSyncWidget({id: c1f6082c-f7b9-4d1e-b64e-9071a3860ffc, kind: 'text-poll'})

    Parameters

    Returns Promise<unknown>

createWidget

createWidgetElement

  • Creates and immediately displays widget.

    since

    1.18.0

    example
    const widgetEl = document.querySelector('livelike-widgets')\n
    widgetEl.createWidgetElement({id: c1f6082c-f7b9-4d1e-b64e-9071a3860ffc, kind: 'text-poll'})

    Parameters

    Returns Promise<unknown>

detach

  • detach(widgetEl: Widget): Promise<void>
  • async

    Removes widget from DOM. Fires beforewidgetdetached and widgetdetached events. Removes listeners.

    fires

    beforewidgetdetached

    fires

    widgetdetached

    Parameters

    Returns Promise<void>

disconnectedCallback

  • disconnectedCallback(): void
  • Returns void

enqueueWidget

  • Adds widget to the widgetQueue for spoiler prevention

    since

    1.18.0

    link

    spoilerPrevention

    Parameters

    Returns any

firstUpdated

  • firstUpdated(): void
  • Returns void

getUnclaimedRewards

  • getUnclaimedRewards(): Promise<any>
  • Returns Promise<any>

loadNextPage

  • loadNextPage(): any
  • Returns any

loadTimeline

  • loadTimeline(programId: any): Promise<void>
  • Parameters

    • programId: any

    Returns Promise<void>

onInitialWidgetsLoaded

  • onInitialWidgetsLoaded(__namedParameters: Object): any
  • Parameters

    • __namedParameters: Object

    Returns any

onMoreWidgetsLoaded

  • onMoreWidgetsLoaded(__namedParameters: Object): any
  • Parameters

    • __namedParameters: Object

    Returns any

onWidgetReceived

  • onWidgetReceived(widgetPayload: any): any
  • Parameters

    • widgetPayload: any

    Returns any

overRideTimer

  • overRideTimer(__namedParameters: Object): number
  • Parameters

    • __namedParameters: Object

    Returns number

registerWidgetMode

  • registerWidgetMode(name: string, mode: WidgetMode): void
  • Registers widget mode

    Parameters

    Returns void

render

  • render(): TemplateResult
  • Returns TemplateResult

showWidget

  • Immediately begins widget lifecycle and state transitions.

    since

    1.18.0

    Parameters

    Returns Promise<unknown>

start

updateEl

  • updateEl(): void
  • Returns void

updated

  • updated(changedProps: any): void
  • Parameters

    • changedProps: any

    Returns void

widgetListener

  • widgetListener(e: any): void
  • Parameters

    • e: any

    Returns void

Legend

  • Namespace
  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Interface
  • Interface with type parameter
  • Property
  • Method
  • Enumeration
  • Inherited constructor

Generated using TypeDoc