Surface - Emit event without needing DOM event to trigger

Is it possible to have an event emitted by updating the socket or some other method independent of DOM events? A use case would be to have the LiveComponent emit an event when a state change satisfies a certain criteria.

This would be how I would like to use the event prop in code:

defmodule IsFiveCount do
  use Surface.LiveComponent

  prop is_five, :event
  data count, :integer, default: 0

  def render(assigns) do
    ~H"""
    <div>
      <h1 class="title">
        {{ @count }}
      </h1>
      <div>
        <button class="button is-info" :on-click="dec">-</button>
        <button class="button is-info" :on-click="inc">+</button>
      </div>
    </div>
    """
  end

  def handle_event("inc", _, socket) do
    if socket.assigns.count == 4 do
      socket = emit(socket, :is_five)
    end

    {:noreply, update(socket, :count, &(&1 + 1))}
  end

  def handle_event("dec", _, socket) do
    if socket.assigns.count == 6 do
      socket = emit(socket, :is_five)
    end

    {:noreply, update(socket, :count, &(&1 - 1))}
  end

defmodule Parent do
  use Surface.LiveComponent

  def render(assigns) do
    ~H"""
    <IsFiveCount is_five="signal" />
    """
  end

  def handle_event("signal", _, socket) do
    # Do something.
  end

In Vue you would get this functionality using the $emit function.

If you want to fake an event on the server side you can just call the handle_event method? If you want to fake an event on the client side you can call pushEvent