Summary
Wrapper exposes a small slice of Tawk_API and declares 15 hook fields it never bridges to consumers; several documented methods (popup/toggle/getStatus/isChat*/addTags/login) and config-time fields (visitor preload, customStyle.zIndex, autoStart, onBeforeLoad) are missing, and the bridged onUnreadCountChanged callback is not present in current public docs.
Gaps found
Missing API surface
Events not bridged
Config options not exposed
Auth modes
Deprecations in our current code
Intentionally out of scope
- Customization API beyond
customStyle.zIndex (no customTabs, no background/position fields documented in current public JS API).
- REST/admin APIs.
- Pop-out window callback limitations (vendor note: "Pop-out chat windows do not support most event callbacks").
Sources
Summary
Wrapper exposes a small slice of
Tawk_APIand declares 15 hook fields it never bridges to consumers; several documented methods (popup/toggle/getStatus/isChat*/addTags/login) and config-time fields (visitor preload, customStyle.zIndex, autoStart, onBeforeLoad) are missing, and the bridgedonUnreadCountChangedcallback is not present in current public docs.Gaps found
Missing API surface
maximize()/minimize()— declared inTawkAPIinterface but no public wrapper export — https://developer.tawk.to/jsapi/toggle()— switch between maximized/minimized — https://developer.tawk.to/jsapi/popup()— open chat as separate pop-out window — https://developer.tawk.to/jsapi/toggleVisibility()— flip widget hidden/shown — https://developer.tawk.to/jsapi/endChat()— only invoked internally insideshutdown(); no standalone public method — https://developer.tawk.to/jsapi/start({ showWidget })— re-open socket afterTawk_API.shutdown/ whenautoStart: false— https://developer.tawk.to/jsapi/getStatus()— returns'online' | 'away' | 'offline'— https://developer.tawk.to/jsapi/getWindowType()— returns'inline' | 'embed'— https://developer.tawk.to/jsapi/isChatMaximized()/isChatMinimized()/isChatHidden()— boolean state queries — https://developer.tawk.to/jsapi/isChatOngoing()/isVisitorEngaged()— conversation-state booleans — https://developer.tawk.to/jsapi/addTags(tags, cb)/removeTags(tags, cb)— chat tag management (max 10 tags) — https://developer.tawk.to/jsapi/login(data, cb)/logout(cb)— declared in interface but never called; currentidentify()only sendssetAttributeswithhash, missing the properlogin()path that restores past conversations — https://developer.tawk.to/jsapi/setAttributesphonefield (E.164) — wrapper passesname/email/hashonly; phone is documented invisitor{},login(), andsetAttributes()— https://developer.tawk.to/jsapi/Events not bridged
on(event, handler) / off(event, handler)subscription wrapping the 15 declared Tawk hooks; today consumers cannot subscribe to anything except unread count — https://developer.tawk.to/jsapi/onBeforeLoad— not declared in the wrapper'sTawkAPIinterface at all — https://developer.tawk.to/jsapi/onPrechatSubmit(data)— pre-chat form payload, not declared — https://developer.tawk.to/jsapi/onOfflineSubmit(data)— offline form payload, not declared — https://developer.tawk.to/jsapi/onStatusChange/onChatMaximized/onChatMinimized/onChatHidden/onChatStarted/onChatEnded/onChatMessageVisitor/onChatMessageAgent/onChatMessageSystem/onAgentJoinChat/onAgentLeaveChat/onChatSatisfaction/onVisitorNameChanged/onFileUpload/onTagsUpdated— declared on the interface, never bridged to a public listener API — https://developer.tawk.to/jsapi/Config options not exposed
Tawk_API.visitor = { name, email, hash, phone }preload — must be set before the embed script loads; wrapper sets identity post-load viasetAttributesonly, losing the documented preload pattern — https://developer.tawk.to/jsapi/Tawk_API.customStyle.zIndex— only documentedcustomStylefield, not exposed — https://developer.tawk.to/jsapi/autoStart: false(paired withstart()) — defer socket connection until user interaction — https://developer.tawk.to/jsapi/onBeforeLoadconfig-time hook — must be assigned before script download — https://developer.tawk.to/jsapi/switchWidget: docs only describeswitchWidget({ propertyId, widgetId }, cb); wrapper omits the completion callback — https://developer.tawk.to/jsapi/Auth modes
login({ hash, userId, name, email, phone })is the documented authenticated path and restores past conversations; wrapper currently routes everything throughsetAttributes({ hash })and never callslogin()/logout()— https://developer.tawk.to/jsapi/Deprecations in our current code
onUnreadCountChanged— bridged byonUnreadCountChange()but absent from currentdeveloper.tawk.to/jsapi/callback list; verify it still fires or mark as undocumented/legacy — https://developer.tawk.to/jsapi/Tawk_API.shutdown()exists in vendor docs (disconnects socket) but wrapper'sshutdown()callsendChat()instead; consider also calling vendorTawk_API.shutdown()for full socket teardown — https://developer.tawk.to/jsapi/Intentionally out of scope
customStyle.zIndex(nocustomTabs, no background/position fields documented in current public JS API).Sources