add support for type attribute in JSInterop IncludeScript

This commit is contained in:
sbwalker
2023-05-18 09:36:09 -04:00
parent f1ec70ff14
commit 076d150f72
3 changed files with 24 additions and 9 deletions

View File

@ -92,12 +92,17 @@ namespace Oqtane.UI
// external scripts need to specify src, inline scripts need to specify id and content
public Task IncludeScript(string id, string src, string integrity, string crossorigin, string content, string location)
{
return IncludeScript(id, src, integrity, crossorigin, "", content, location);
}
public Task IncludeScript(string id, string src, string integrity, string crossorigin, string type, string content, string location)
{
try
{
_jsRuntime.InvokeVoidAsync(
"Oqtane.Interop.includeScript",
id, src, integrity, crossorigin, content, location);
id, src, integrity, crossorigin, type, content, location);
return Task.CompletedTask;
}
catch