aurelia / aurelia/framework

Camelcase Custom Events

Open
#918 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.7k
Forks
608
PR merge metrics
No merged PRs in 30d

Description

**I'm submitting a feature request**

* **Library Version:**
1.3.0

**Please tell us about your environment:**
* **Operating System:**
Windows 10

* **Node Version:**
v10.10.0

* **NPM Version:**
6.4.1

* **Aurelia CLI OR JSPM OR Webpack AND Version**
Local aurelia-cli v1.0.0-beta.8 | webpack 4.27.0

* **Browser:**
all

* **Language:**
all

**Current behavior:**
Camelcase Custom Events are not handled by the binding engine

https://gist.run/?id=cc241040c915ecc7f8a80aaa97f9591f

**Expected/desired behavior:**
Camelcase Custom Events should be handled by the binding engine

* **What is the motivation / use case for changing the behavior?**

Hello there, well I do know that Aurelia needs to declare camel-case attributes as dash case when writing html, but lately I came across this case where I'm using Ionic v4 (beta) which is based on stencil (ionic's web component compiler) so thanks to the fact that these are web components means I don't really need to do much in Aurelia to make them work, they just work and that's fine.

The main problem is that Ionic has adopted the idea of Emitting *CustomEvent*s with camel-case based names in Aurelia we would usually have something like `ion-change` instead of `ionChange`. Ionic did this, so anyone else can also do that. That could make third party web components to not work as smoothly with Aurelia as any other Aurelia plugin

Contributor guide

Open the contributing guide

Research direction

Start with the linked gist and reproduce the camel-case CustomEvent behavior in the Aurelia binding engine described here. Trace how event names are handled and verify the result against both camel-case and dash-case custom events. Done means camel-case custom events are handled without regressing existing event behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.