@connextlive/core
v0.1.3
Published
ConnextLive core loader and JS API proxy
Readme
@connextlive/core
Core loader and JS API proxy for ConnextLive widget.
- Loads the embed script via your backend endpoint
/api/widget/embed. - Proxies calls to the primary
window.ConnextLiveWidgetAPI.
Install
npm install @connextlive/core
Usage
import { ensureLoaded, Connext, onReady } from '@connextlive/core'
ensureLoaded({ baseUrl: 'https://connextlive.io', siteId: 'SITE_ID', autoInit: true })
onReady(() => {
Connext.updateUser({ name: 'John', email: '[email protected]' })
Connext.open()
})API
- ensureLoaded(config)
- onReady(cb)
- Connext.init(config)
- Connext.open(), close(), toggle()
- Connext.updateUser(user)
- Connext.getVisitor(), isOpen()
- Connext.configure(config)
