solid-primitives icon indicating copy to clipboard operation
solid-primitives copied to clipboard

mouse typings should support SVGSVGElement as target

Open edemaine opened this issue 1 year ago • 0 comments

Describe The Problem To Be Solved

@solid-primitives/mouse currently restricts the target to be (an accessor of) HTMLElement | Window | Document. I'd like the typings to include SVGSVGElement (and maybe all/more of SVGElement), which works fine in my testing.

Suggest A Solution

The docstring actually says Element instead of HTMLElement, but this doesn't match the typings of @solid-primitives/event. I couldn't quite decipher the TargetWithEventMap magic to make this work out, but ideally you could use the same typings from there.

edemaine avatar Nov 18 '23 19:11 edemaine