docs
docs copied to clipboard
Web Components: Add Event Handling Caveat
Description of Problem
The custom elements section currently includes an incorrect score from Custom Elements Everywhere. Even if Custom Elements Everywhere decided to accept custom directives as satisfactory (which they have not), I don't think the score is all that relevant. Bottom line: custom elements work, and there are some caveats.
The caveat around listening for events with capital letters currently is not documented, and neither is the recommended solution.
Proposed Solution
- Remove the sentence referring to Custom Elements Everywhere
- Document the caveat around listening to events with names other than lowercase and kebab-case names
- Document the recommended solution of using a custom directive
Additional Information
Related issue: https://github.com/vuejs/core/issues/5401 Related closed PR: https://github.com/vuejs/docs/pull/1553 Related RFC discussion: https://github.com/vuejs/rfcs/discussions/451 Closes #1708
Deploy Preview for vuejs ready!
| Name | Link |
|---|---|
| Latest commit | 3f5592fa1c315375ec443c842574ec6056e2cb7a |
| Latest deploy log | https://app.netlify.com/sites/vuejs/deploys/630ce023fdca9d0008decaff |
| Deploy Preview | https://deploy-preview-1890--vuejs.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
@LinusBorg I see you were assigned to review. Any thoughts?
LGTM
Hold it for now - I believe this should be considered a bug and is fixable.
Hold it for now - I believe this should be considered a bug and is fixable.
@yyx990803 For camelCase it mighr be, i think i even have an open PR for that? Not sure 😅
But in Vue core we map onUpperCase props to upperCase events, so we cant real differentiate between a camelCase and PascalCase Listener.