livechat/chat-widget-adapters

asyncInit incorportation

Opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
There is a lack of asyncInit option (in the ExtendedWindow type from livechat-core)
image

feature requested: https://developers.livechat.com/updates/load-livechat-widget-on-demand

Describe the solution you'd like
Probably an update on LC api -> introducing new input [asyncInit] -> we can get LC component via @ViewChild(LiveChatWidgetComponent), so using liveChatWidgetComponent.reinitialize() in .ts code is not an issue, or everything via inputs is also fine

Describe alternatives you've considered
I tried to set (window as any).__lc.asyncInit = true; myself but to no avail -> it should be set after license etc. but before initialization and i have no control over it cause of the widget

Additional context
I need to hold loading of LC code before user agrees to cookies or anything else and i see no mention for asyncInit anywhere in the codebase here - maybe some update pretty please?