LayoutStaticAssetLoadHints Class#
Load-order and timing hints applied to a script LayoutStaticAsset by the
host when injecting the corresponding <script> tag. Hints are advisory:
hosts that do not recognize a value fall back to defaults.
public sealed record LayoutStaticAssetLoadHints : System.IEquatable<Verso.Abstractions.LayoutStaticAssetLoadHints>
Inheritance System.Object → LayoutStaticAssetLoadHints
Implements System.IEquatable<LayoutStaticAssetLoadHints>
Constructors#
LayoutStaticAssetLoadHints(LayoutScriptModuleKind, LayoutScriptLoadMode, LayoutScriptPlacement) Constructor#
Load-order and timing hints applied to a script LayoutStaticAsset by the
host when injecting the corresponding <script> tag. Hints are advisory:
hosts that do not recognize a value fall back to defaults.
public LayoutStaticAssetLoadHints(Verso.Abstractions.LayoutScriptModuleKind ModuleKind=Verso.Abstractions.LayoutScriptModuleKind.Classic, Verso.Abstractions.LayoutScriptLoadMode LoadMode=Verso.Abstractions.LayoutScriptLoadMode.Defer, Verso.Abstractions.LayoutScriptPlacement Placement=Verso.Abstractions.LayoutScriptPlacement.AfterLayoutHtml);
Parameters#
ModuleKind LayoutScriptModuleKind
Whether the script is an ES module (type="module") or a classic script. Module
scripts cannot read document.currentScript; module authors that need bridge
access should call window.verso.layout.bind({...}) with explicit identifiers.
LoadMode LayoutScriptLoadMode
Whether the script should be deferred, loaded asynchronously, or block parsing. Defaults to Defer which lets the layout HTML render first and preserves source-order execution.
Placement LayoutScriptPlacement
Whether the <script> tag is rendered before or after the layout root in DOM
order. Defaults to AfterLayoutHtml.
Properties#
LoadMode Property#
Whether the script should be deferred, loaded asynchronously, or block parsing. Defaults to Defer which lets the layout HTML render first and preserves source-order execution.
public Verso.Abstractions.LayoutScriptLoadMode LoadMode { get; init; }
Property Value#
ModuleKind Property#
Whether the script is an ES module (type="module") or a classic script. Module
scripts cannot read document.currentScript; module authors that need bridge
access should call window.verso.layout.bind({...}) with explicit identifiers.
public Verso.Abstractions.LayoutScriptModuleKind ModuleKind { get; init; }
Property Value#
Placement Property#
Whether the <script> tag is rendered before or after the layout root in DOM
order. Defaults to AfterLayoutHtml.
public Verso.Abstractions.LayoutScriptPlacement Placement { get; init; }