TypeScript-DOM-lib-generator icon indicating copy to clipboard operation
TypeScript-DOM-lib-generator copied to clipboard

Override SVGSVGElement method getElementById

Open remcohaszing opened this issue 2 years ago • 4 comments

This method may return null, but not according to the current type definitions.

remcohaszing avatar Oct 09 '23 08:10 remcohaszing

Thanks for the PR!

This section of the codebase is owned by @saschanaz - if they write a comment saying "LGTM" then it will be merged.

github-actions[bot] avatar Oct 09 '23 08:10 github-actions[bot]

Perhaps on this svg level this could/should return SVGElement | null because <foreignObject> should be rare enough.

HolgerJeromin avatar Oct 09 '23 22:10 HolgerJeromin

I don’t think it’s a good idea to use anything other than Element | null, because that would be technically incorrect. I also doubt this would bring any benefits.

remcohaszing avatar Oct 12 '23 13:10 remcohaszing

This is a spec issue, I just filed one. Thanks! https://github.com/w3c/svgwg/issues/923

saschanaz avatar Oct 21 '23 11:10 saschanaz

Hello @saschanaz I think since your PR was merged, we can close this pr

Bashamega avatar Apr 02 '25 06:04 Bashamega