svelte-tiny-virtual-list icon indicating copy to clipboard operation
svelte-tiny-virtual-list copied to clipboard

Property 'remove' does not exist on type 'Window & typeof globalThis'

Open christowiz opened this issue 1 year ago • 0 comments

The feature detection for event listener third argument is calling the wrong method on window

window.remove('testpassive', arg, arg);

It should be

window.removeEventListener('testpassive', arg, arg);

This comes from the URL referenced in the comment above it: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection

https://github.com/jonasgeiler/svelte-tiny-virtual-list/blob/f179308e3262386b42237fc002d76093a58df5e4/src/lib/VirtualList.svelte#L20

christowiz avatar Dec 09 '24 17:12 christowiz