refactored script resource declaration to allow for bundling, made script loading async, refactored RichTextEditor to use new method

This commit is contained in:
Shaun Walker
2020-06-17 10:27:14 -04:00
parent 7c24bae753
commit 0636227284
10 changed files with 70 additions and 104 deletions

View File

@ -117,23 +117,13 @@ namespace Oqtane.UI
}
}
public async Task LoadScript(string url, string integrity, string crossorigin)
public async Task IncludeScripts(object[] scripts)
{
try
{
await _jsRuntime.InvokeVoidAsync("Oqtane.Interop.loadScript", url, integrity, crossorigin);
}
catch
{
// ignore exception
}
}
public async Task LoadBootstrapJS()
{
try
{
await _jsRuntime.InvokeVoidAsync("Oqtane.Interop.loadBootstrapJS");
await _jsRuntime.InvokeVoidAsync(
"Oqtane.Interop.includeScripts",
(object)scripts);
}
catch
{