Class LiveLikeWidgets
Hierarchy
- LitElement
- LiveLikeWidgets
Index
Constructors
Properties
Methods
Constructors
constructor
- new
Live Like Widgets(): LiveLikeWidgets Returns LiveLikeWidgets
Properties
authors
Add to element to enabled listing the widget author tag in timeline mode
custom Template Renderer
custom Widget Renderer
data Id
date Time Formatter
Type declaration
- (__namedParameters): string
Formats timestamp
Parameters
__namedParameters: {
format: any;
lang: any;
time: any;
}format: any
lang: any
time: any
Returns string
Since
2.43.0
Argument
object of type {time, format, lang}
has Widget Attached
hide_ dismiss_ button
Boolean to toggle displaying the widget's dismiss button
lang
Sets language code
loaded
If the element has loaded
mode
The mode of the element. Either "pop-up" or "timeline". Default is "pop-up"
programid
The id of the program to load the element with
queue
reactions
If true, widget reactions are shown once widget is not longer in 'ready' or 'interactive' phase
sync Strategy
Sets the custom syncStrategy
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
Add to element to enabled listing the widget timestamps tag in timeline mode
updating
Methods
after Widgets Loaded
attach
- attach(widgetEl, position): Promise<void>
Parameters
widgetEl: Widget
position: "append" | "prepend"
Returns Promise<void>
Async
Attaches widget to DOM. Fires widgetattached events.
Fires
widgetattached
create Sync Widget
- create
Sync Widget(args): Promise<unknown> Creates and queues widget from widget id and kind. Displays widget according to syncStrategy.
Parameters
args: IWidgetCreationArgs
Returns Promise<unknown>
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'})
create Widget
- create
Widget(args): Promise<any> Parameters
args: IWidgetDisplayArgs
Returns Promise<any>
create Widget Element
- create
Widget Element(args): Promise<unknown> Creates and immediately displays widget.
Parameters
args: IWidgetCreationArgs
Returns Promise<unknown>
Since
1.18.0
Example
const widgetEl = document.querySelector('livelike-widgets')\n
widgetEl.createWidgetElement({id: c1f6082c-f7b9-4d1e-b64e-9071a3860ffc, kind: 'text-poll'})
detach
- detach(widgetEl): Promise<void>
Parameters
widgetEl: Widget
Returns Promise<void>
Async
Removes widget from DOM. Fires beforewidgetdetached and widgetdetached events. Removes listeners.
Fires
beforewidgetdetached
Fires
widgetdetached
disconnected Callback
enqueue Widget
- enqueue
Widget(args): any Adds widget to the widgetQueue for spoiler prevention
Parameters
args: IWidgetDisplayArgs
Returns any
Since
1.18.0
Link
spoilerPrevention
first Updated
get Unclaimed Rewards
load Next Page
load Timeline
on Initial Widgets Loaded
on More Widgets Loaded
on Widget Received
over Ride Timer
register Widget Mode
- register
Widget Mode(name, mode): void Registers widget mode
Parameters
name: string
mode: WidgetMode
Returns void
render
show Widget
- show
Widget(args): Promise<unknown> Immediately begins widget lifecycle and state transitions.
Parameters
args: IWidgetDisplayArgs
Returns Promise<unknown>
Since
1.18.0
start
- start(args): Promise<any>
Parameters
args: IWidgetDisplayArgs
Returns Promise<any>
update El
updated
widget Listener
Generated using TypeDoc
Element
livelike-widgets