Skip to content

narrow popover related attribute types to just <button> and <input> elements #236

@thescientist13

Description

@thescientist13

Current State

Coming out of #229 , had to manually extend our types to support popovertarget and popovertargetaction explicitly. However, per the spec it should really only apply to <button> and <input> elements.

Desired State

This should work

<button popovertarget="mobile-menu" popovertargetaction="hide">
  Close
</button>

But this should error

<span popovertarget="mobile-menu">Close</span>

Additional Context

Curious in general though why it doesn't work? Shouldn't TypeScript's DOM lib support this already? 🤔
https://github.com/microsoft/TypeScript-DOM-lib-generator

Metadata

Metadata

Assignees

Labels

0.20.0enhancementImprovement to existing functionalitygood first issueGood for newcomershelp wantedExtra attention is neededquestionFurther information is requested

Projects

Status

✅ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions