It's is a very common case that one wants to stop the event and set the return value:
evt.stop();
evt.return = 'foo';
I think that is should be possible to do it in a single line. We should keep the possibility to set the return value without stopping event, so not to make it confusing I would do:
evt.stop( 'foo' );
IMO, evt.stop( value ) will not read well. Do you stop the value? What does "stop event with value" mean?
I know about ckeditor/ckeditor5-engine#1234 and @scofalik's idea to have helpers totally resolves that case. After we implement them (I plan this still in it14) we won't have many evt.stop+evt.return in our code.
Or maybe I'm overexaggerating... I don't know. I don't have a strong opinion on that.
Yea, I'm also not sure about it. And it's not that common case in fact. Let's keep it open for the future cases.
It's been over 1.5 year since the ticket was open and we don't see a strong need to implement this API.
Most helpful comment
IMO,
evt.stop( value )will not read well. Do you stop the value? What does "stop event with value" mean?I know about ckeditor/ckeditor5-engine#1234 and @scofalik's idea to have helpers totally resolves that case. After we implement them (I plan this still in it14) we won't have many
evt.stop+evt.returnin our code.