fix: navigation blink root-caused — defer search-client.js (was parser-blocking mid-body), npm run demo serves the production build through the tunnel; DESIGN.md documents the VT removal + font-swap decision
This commit is contained in:
@@ -107,8 +107,13 @@ const links = [
|
||||
</details>
|
||||
</div>
|
||||
</header>
|
||||
<script is:inline src="/search-client.js"></script>
|
||||
<script is:inline>
|
||||
{/* Search enhancement is deferred — a synchronous script here would stall
|
||||
the parser mid-body on every navigation (blank below the header until
|
||||
it arrives). `defer` + the inline `type="module"` init join the same
|
||||
after-parse in-order queue (HTML spec), so newsSearch is defined first.
|
||||
The forms are plain GET /search, so nothing user-facing waits on JS. */}
|
||||
<script is:inline src="/search-client.js" defer></script>
|
||||
<script is:inline type="module">
|
||||
// Header search suggestions (desktop field + mobile reveal); the forms
|
||||
// are plain GET /search, so everything below is progressive enhancement.
|
||||
newsSearch({ input: 'hdr-q', list: 'hdr-suggest', status: 'hdr-suggest-status', limit: 6, unit: 'suggestion', dismiss: true });
|
||||
|
||||
Reference in New Issue
Block a user