Repository navigation
fix(types): add missing global attributes and event handlers - #7046
Merged
johnjenkins merged 4 commits intoNov 27, 2026
Merged
Conversation
Contributor
|
Hey @marcomattes thanks for this but non v5-specific fixes like this should go into main / v4 still atm and come into v5 downstream 🙏 |
marcomattes
force-pushed
the
fix/jsx-global-attr-types
branch
from
November 26, 2026 12:24
2ec19e1 to
afa0890
Compare
Contributor
Author
|
Thanks @johnjenkins, makes sense! I've retargeted this to |
johnjenkins
reviewed
Nov 26, 2026
- add Capture variants for canvas and track events - type onContentVisibilityAutoStateChange with ContentVisibilityAutoStateChangeEvent - drop unshipped `anchor` attribute Co-Authored-By: Claude Opus 5.5 <[email protected]>
johnjenkins
approved these changes
Nov 26, 2026
johnjenkins
enabled auto-merge (squash)
November 26, 2026 23:56
johnjenkins
added a commit
that referenced
this pull request
Nov 27, 2026
* fix(types): add missing global attributes and event handlers * fix(types): address review feedback on JSX attribute types - add Capture variants for canvas and track events - type onContentVisibilityAutoStateChange with ContentVisibilityAutoStateChangeEvent - drop unshipped `anchor` attribute Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: John Jenkins <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the current behavior?
Several standard global attributes and event handlers are missing from the
JSXBasetypes, so using them in TSX is a type error (e.g.onBeforeInput,onCommand,onScrollEnd,writingSuggestions,anchor).GitHub Issue Number: N/A
What is the new behavior?
Adds the missing types to
src/declarations/stencil-public-runtime.ts:virtualKeyboardPolicy,writingSuggestions(plus lowercase variants),anchor,containertiming,containertimingignore,headingoffset,headingresetCapturevariants):onBeforeMatch,onContentVisibilityAutoStateChange,onCommand(newCommandEventinterface),onBeforeInput,onFormData,onSelectionChange,onSelectStart,onFullscreenchange/onFullscreenerror,onSecurityPolicyViolation,onPointerRawUpdate,onScrollEnd,onScrollSnapChange,onScrollSnapChanging,onAnimationCancelonContextLost/onContextRestoredon<canvas>,onCueChangeon<track>The fullscreen handlers stay lowercase (
onFullscreenchange) becauseonfullscreenchangeis not onwindow, so the runtime keeps the case as written.Documentation
N/A
Does this introduce a breaking change?
Testing
Type-only, additive change (new optional members and one new interface). Verify with
npm run build.Other information
N/A