ScriptLoader
This documentation provides a comprehensive reference for the ScriptLoader component, guiding you through its configuration options.
Screenshot #

Parameters #
| Name | Type | Default | Required | Description | Added Version |
|---|---|---|---|---|---|
| AdditionalAttributes | Dictionary<string, object> | null | Gets or sets additional attributes that will be applied to the component. | 1.0.0 | |
| Async | bool | False | Gets or sets a value indicating whether the script should be loaded asynchronously. | 1.0.0 | |
| Class | string? | null | Gets or sets the CSS class name(s) to apply to the component. | 1.0.0 | |
| Defer | bool | False | Gets or sets a value indicating whether the script is meant to be executed after the document has been parsed, but before firing DOMContentLoaded event. | 1.0.0 | |
| Id | string? | null | Gets or sets the ID. If not set, a unique ID will be generated. | 1.0.0 | |
| ScriptId | string | null | Gets or sets the ID of the script element. | 1.0.0 | |
| Source | string | null | Gets or sets the URI of the external script to load. | 1.0.0 | |
| Style | string? | null | Gets or sets the CSS style string that defines the inline styles for the component. | 1.0.0 |
Events #
| Name | Return Type | Description | Added Version |
|---|---|---|---|
| OnError | EventCallback<string> | An event that is fired when a script loading error occurs. | 1.0.0 |
| OnLoad | EventCallback | An event that is fired when a script has been successfully loaded. | 1.0.0 |