# `MingaEditor.Frontend.Emit`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/frontend/emit.ex#L1)

Stage 7: Emit.

Encodes the composed frame as semantic render-model protocol commands, then handles shared concerns (viewport tracking, title, window background).

# `ctx`

```elixir
@type ctx() :: MingaEditor.Frontend.Emit.Context.t()
```

Emit context containing only the data emit needs.

# `emit`

```elixir
@spec emit(
  MingaEditor.RenderPipeline.ComposedFrame.t(),
  ctx(),
  MingaEditor.RenderPipeline.Chrome.t() | nil,
  MingaEditor.Renderer.Caches.t()
) :: {MingaEditor.Renderer.Caches.t(), MingaEditor.UI.FontRegistry.t()}
```

Converts the frame to semantic protocol command binaries and sends them to the frontend port.

Also sends title and window background color when they change
(side-channel writes). Returns updated caches and the renderer-owned font
registry for write-back to the Renderer process.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
