pixiebrix-extension
pixiebrix-extension copied to clipboard
Content script remains "ready" even after unloading
My logic might have been incorrect in:
- https://github.com/pixiebrix/pixiebrix-extension/pull/3915
See:
https://github.com/pixiebrix/pixiebrix-extension/blob/e6644547df7a73dca2fe9600b18a2423e0fa2ce2/src/contentScript/ready.ts#L18-L32
Related
- https://github.com/pixiebrix/pixiebrix-extension/issues/4189
In the situation described by that issue, our logic trips trips on the "ready" attribute and reports the content script as "ready" even if the new one hasn't been injected.
Solution
onContextInvalidated().then(() => {
if body[READY_ATTRIBUTE] === currentUuid
removeAttribute(body, READY_ATTRIBUTE)
})
Also related
- https://github.com/pixiebrix/pixiebrix-extension/issues/4124