Improvements to add support for script type and data-* attributes. Also added Script and Stylesheet classes to simplify Resource declarations.
This commit is contained in:
@ -117,12 +117,17 @@ namespace Oqtane.UI
|
||||
}
|
||||
|
||||
public Task IncludeScript(string id, string src, string integrity, string crossorigin, string type, string content, string location)
|
||||
{
|
||||
return IncludeScript(id, src, integrity, crossorigin, type, content, location, null);
|
||||
}
|
||||
|
||||
public Task IncludeScript(string id, string src, string integrity, string crossorigin, string type, string content, string location, Dictionary<string, string> dataAttributes)
|
||||
{
|
||||
try
|
||||
{
|
||||
_jsRuntime.InvokeVoidAsync(
|
||||
"Oqtane.Interop.includeScript",
|
||||
id, src, integrity, crossorigin, type, content, location);
|
||||
id, src, integrity, crossorigin, type, content, location, dataAttributes);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
catch
|
||||
|
Reference in New Issue
Block a user