Commit 85603ab
committed
fix(xiaohongshu): address copilot review on creator-note-detail hook
Two polish items from the Copilot review on #1732:
- Buffer reset: window.__xhsCapture is now cleared on every install call
so stale captures from a previous run on the same tab cannot leak into
the current navigation's harvest. The wrapper-install guard moves to a
separate __xhsCaptureInstalled flag so the fetch/XHR monkey-patches
themselves are still installed exactly once per page lifetime.
- XHR static constants: HookedXHR now copies the readyState constants
(UNSENT / OPENED / HEADERS_RECEIVED / LOADING / DONE) from the original
constructor so dashboard code that reads XMLHttpRequest.DONE etc against
the constructor keeps working.1 parent f636191 commit 85603ab
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
| 259 | + | |
259 | 260 | | |
| 261 | + | |
| 262 | + | |
260 | 263 | | |
261 | 264 | | |
262 | 265 | | |
| |||
289 | 292 | | |
290 | 293 | | |
291 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
292 | 300 | | |
293 | 301 | | |
294 | 302 | | |
| |||
0 commit comments