docs icon indicating copy to clipboard operation
docs copied to clipboard

Web Components: Add Event Handling Caveat

Open aztalbot opened this issue 3 years ago • 1 comments
trafficstars

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

aztalbot avatar Aug 05 '22 03:08 aztalbot

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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Aug 05 '22 03:08 netlify[bot]

@LinusBorg I see you were assigned to review. Any thoughts?

aztalbot avatar Aug 19 '22 04:08 aztalbot

LGTM

LinusBorg avatar Aug 29 '22 16:08 LinusBorg

Hold it for now - I believe this should be considered a bug and is fixable.

yyx990803 avatar Aug 30 '22 01:08 yyx990803

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.

LinusBorg avatar Aug 30 '22 05:08 LinusBorg