title: Check if a component has an event listener attached to it
body: <p>Assuming there's some <code>&lt;Form&gt;</code> component. It can be called with a <code>@cancel</code> event listener attached to it and if it's the case, I want to show the cancel button that triggers this event. If there's no <code>@cancel</code> event, the cancel button should not be visible.</p>
  
  <p>Is there a way to check if a component has event listener attached to it?</p>
  
  <p>Currently I do:</p>
  
  <pre><code>&lt;template&gt;
    &lt;form&gt;
      &lt;button v-if="cancelEventPassed" @click="$emit('cancel')"&gt;Cancel&lt;/button&gt;
    &lt;/form&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>And call it like this:</p>
  
  <pre><code>&lt;Form :cancelEventPassed="true" @cancel="handle_cancel" /&gt;
  </code></pre>
  
  <p>either</p>
  
  <pre><code>&lt;Form/&gt;
  </code></pre>
  
  <p>Is it possible to achieve this without using any additional property like <code>cancelEventPassed</code>?</p>