You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assertion Failed: You can not define a function that handles DOM events in the <twiddle@component:wrapper-component::ember276> tagless component since it doesn't have any DOM element.
While the assertion is technically correct, I explicitly want to opt out of it for some tagless components, in order to avoid having to use needlessly convoluted / verbose action names like onClick.
This assertion is a major annoyance when trying to build container components:
— ember-glimmer/lib/component.ts#L571
It is triggered, when you define methods or pass actions named like the default events or custom events that are handled by the
EventDispatcher
.Ember Twiddle Demo
While the assertion is technically correct, I explicitly want to opt out of it for some tagless components, in order to avoid having to use needlessly convoluted / verbose action names like
onClick
.EventDispatcher
callshandleEvent
onViewMixin
, which delegates to the_currentState.handleEvent
of the component, which ishandleEvent
ofhas_element
(in_dom
).This function needs to check, whether the proposed opt-out flag is enabled and immediately
return true
then.I'd love to submit a PR for this. Will this get accepted?
What should we call the flag?
skipEventDispatcher
or something like this?The text was updated successfully, but these errors were encountered: