-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Description
Attempting to set the property on using an interpolated string value (e.g. from a function like when()) results in a TypeError regarding addEventListener.
Steps to Reproduce
1. The component has a string property named on:
properties() {
return {
on: '', // '' || 'default'
};
}
2. Failing Syntax:
<button on="${when(condition, 'default', '')}">...</button>
3. Error Logged:
Uncaught (in promise) TypeError: Failed to execute 'addEventListener' on 'EventTarget': parameter 2 is not of type 'Object'.
4. Working Syntax:
<button on="default">...</button>
<button .on="${when(condition, 'default', '')}">...</button>
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers