# `FogOfWar.Wrapper.InlineAssets`
[🔗](https://github.com/mrluc/fow/blob/main/lib/fog_of_war/wrapper/inline_assets.ex#L1)

An offline Apple WebView needs its startup JavaScript and CSS even when the website cannot answer. This module embeds collected same-origin scripts and styles into the startup document so it can run without fetching those files from the site. Native bundle preparation calls it automatically.

## How it fits

Called by `FogOfWar.Wrapper.NativeBundle` when preparing the Apple startup document. App developers normally interact with the bundle preparation task instead.

# `inline`

Inline gathered same-origin scripts and stylesheets in startup HTML.

`assets` is the `Export.copy_assets!/5` map (`URL path => stage-relative file`).
Deferred classic scripts are appended to the body in their original order.

---

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