livechat / chat-widget-adapters

This project contains a set of libraries for adapting LiveChat Chat Widget with certain frontend frameworks
https://developers.livechat.com
MIT License
24 stars 8 forks source link

asyncInit incorportation #80

Open polonmedia opened 1 year ago

polonmedia commented 1 year ago

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?