Commit c3c3942
fix(chatwoot): destroy() now removes the widget DOM + clears storage
Chatwoot's SDK leaves its iframe and bubble holder in the DOM even after
\$chatwoot.reset(). destroy() now explicitly removes:
- #cw-widget-holder, #cw-bubble-holder, .woot-widget-holder,
.woot-widget-bubble, .woot--bubble-holder, iframe.woot-widget-holder
- localStorage keys containing 'chatwoot' (try/catch so blocked storage
doesn't throw)
Fixes the 'destroy basmadim kaybolmadi' report — after destroy() the
widget is fully gone and load() starts fresh.
env.d.ts gains a minimal Storage interface for the localStorage usage.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent f341e37 commit c3c3942
2 files changed
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
294 | 332 | | |
295 | 333 | | |
296 | 334 | | |
297 | 335 | | |
| 336 | + | |
| 337 | + | |
298 | 338 | | |
299 | 339 | | |
300 | 340 | | |
| |||
0 commit comments