From d76f8daf683092a4ffc753056ae6150d39daa4b6 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Thu, 12 Dec 2024 05:19:57 -0500 Subject: [PATCH] Update script tag location guidance --- .../location-of-javascript.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/aspnetcore/blazor/javascript-interoperability/location-of-javascript.md b/aspnetcore/blazor/javascript-interoperability/location-of-javascript.md index 74f95d165e0f..cee1ec797a16 100644 --- a/aspnetcore/blazor/javascript-interoperability/location-of-javascript.md +++ b/aspnetcore/blazor/javascript-interoperability/location-of-javascript.md @@ -33,17 +33,17 @@ Load JavaScript (JS) code using any of the following approaches: :::moniker-end +## Location of ``) inside the [closing `` element](xref:blazor/project-structure#location-of-head-and-body-content) after the Blazor script reference: @@ -105,7 +105,7 @@ Place the JavaScript tags (``) inside the [closing `` :::moniker range=">= aspnetcore-6.0" -### Load a script from an external JavaScript file (`.js`) collocated with a component +## Load a script from an external JavaScript file (`.js`) collocated with a component [!INCLUDE[](~/blazor/includes/js-interop/js-collocation.md)] @@ -170,7 +170,7 @@ For more information, see . :::moniker range=">= aspnetcore-6.0" -### Inject a script before or after Blazor starts +## Inject a script before or after Blazor starts To ensure scripts load before or after Blazor starts, use a JavaScript initializer. For more information and examples, see . @@ -178,7 +178,7 @@ To ensure scripts load before or after Blazor starts, use a JavaScript initializ :::moniker range="< aspnetcore-6.0" -### Inject a script after Blazor starts +## Inject a script after Blazor starts To inject a script after Blazor starts, chain to the `Promise` that results from a manual start of Blazor. For more information and an example, see .