为 Razor 编译器实际处理的内联脚本登记 nonce;最终是否输出由页面的 CSP 配置决定。 Html.Raw 输出的标签不会经过此帮助类,不能凭字符串看起来像 script 就自动获得授权。
更多...
|
| override void | Process (TagHelperContext context, TagHelperOutput output) |
| | 保留显式 nonce(包括空值)、所有 src 标签以及 JSON 等非执行数据块。
|
|
| ViewContext | ViewContext [get, set] |
| | 当前 Razor 渲染上下文,由 MVC 的标签帮助类激活器提供;不会读取或创建 PageManager。
|
| override int | Order [get] |
| | 等其他脚本帮助类处理完 src 等属性后,再确定本标签是否仍是需要登记的内联脚本。
|
为 Razor 编译器实际处理的内联脚本登记 nonce;最终是否输出由页面的 CSP 配置决定。 Html.Raw 输出的标签不会经过此帮助类,不能凭字符串看起来像 script 就自动获得授权。
◆ Process()
| override void FineUI.Core.CspScriptTagHelper.Process |
( |
TagHelperContext | context, |
|
|
TagHelperOutput | output ) |
保留显式 nonce(包括空值)、所有 src 标签以及 JSON 等非执行数据块。
◆ Order
| override int FineUI.Core.CspScriptTagHelper.Order |
|
get |
等其他脚本帮助类处理完 src 等属性后,再确定本标签是否仍是需要登记的内联脚本。
◆ ViewContext
| ViewContext FineUI.Core.CspScriptTagHelper.ViewContext |
|
getset |
当前 Razor 渲染上下文,由 MVC 的标签帮助类激活器提供;不会读取或创建 PageManager。
该类的文档由以下文件生成: