We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addEventListener
Every addEventListener must be followed by a removeEventListener or else they'll be left behind and cause hard-to-debug issues:
removeEventListener
Enforcing removeEventListener might be difficult, but requiring a signal could be done via types. For example:
signal
addEventListener( type: string, listener: EventListenerOrEventListenerObject, - options?: boolean | AddEventListenerOptions + options: AddEventListenerOptions & {signal: AbortSignal} ): void;
Or just via no-restricted-syntax.
no-restricted-syntax
The most recent issue I found was this listener, left behind between reloads:
https://github.com/pixiebrix/pixiebrix-extension/blob/4878e51b4466cf6d628b5085c6ac964510a924f4/src/contentScript/selectionTooltip/tooltipController.tsx#L281-L299
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Every
addEventListener
must be followed by aremoveEventListener
or else they'll be left behind and cause hard-to-debug issues:Enforcing
removeEventListener
might be difficult, but requiring asignal
could be done via types. For example:Or just via
no-restricted-syntax
.The most recent issue I found was this listener, left behind between reloads:
https://github.com/pixiebrix/pixiebrix-extension/blob/4878e51b4466cf6d628b5085c6ac964510a924f4/src/contentScript/selectionTooltip/tooltipController.tsx#L281-L299
The text was updated successfully, but these errors were encountered: