Stimulus - Promise-Returning Outlet Methods

Premise Stimulus controllers usually talk to each other via dispatched events. That works great for fire-and-forget notifications, but events have no return channel. Sometimes you want a request/response shape instead: ask a controller a question, wait for the answer, act on it. Enter the deferred-promise pattern. The trick is simple: create a promise, stash its resolve function on the controller…