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>
Description
Attempting to set the property
onusing an interpolated string value (e.g. from a function like when()) results in aTypeErrorregardingaddEventListener.Steps to Reproduce
1. The component has a string property named
on: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>