Script TH and defer attribute (#15948)
parent
6b5f9cca20
commit
8ba150cf55
|
@ -4,7 +4,7 @@ author: rick-anderson
|
|||
ms.author: riande
|
||||
description: Discover the ASP.NET Core Script Tag Helper attributes and the role each attribute plays in extending behavior of the HTML Script tag.
|
||||
ms.custom: mvc
|
||||
ms.date: 12/18/2018
|
||||
ms.date: 12/02/2019
|
||||
uid: mvc/views/tag-helpers/builtin-th/script-tag-helper
|
||||
---
|
||||
# Script Tag Helper in ASP.NET Core
|
||||
|
@ -28,6 +28,8 @@ The following Razor markup shows a `script` element with a fallback:
|
|||
</script>
|
||||
```
|
||||
|
||||
Don't use the `<script>` element's [defer](https://developer.mozilla.org/docs/Web/HTML/Element/script) attribute to defer loading the CDN script. The Script Tag Helper renders JavaScript that immediately executes the [asp-fallback-test](#asp-fallback-test) expression. The expression fails if loading the CDN script is deferred.
|
||||
|
||||
## Commonly used Script Tag Helper attributes
|
||||
|
||||
See [Script Tag Helper](xref:Microsoft.AspNetCore.Mvc.TagHelpers.ScriptTagHelper) for all the Script Tag Helper attributes, properties, and methods.
|
||||
|
|
Loading…
Reference in New Issue