integrate old logic for managing stylesheets using JS Interop
This commit is contained in:
@ -90,6 +90,21 @@ namespace Oqtane.UI
|
||||
}
|
||||
}
|
||||
|
||||
public Task IncludeLinks(object[] links)
|
||||
{
|
||||
try
|
||||
{
|
||||
_jsRuntime.InvokeVoidAsync(
|
||||
"Oqtane.Interop.includeLinks",
|
||||
(object)links);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
// 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)
|
||||
{
|
||||
@ -125,6 +140,21 @@ namespace Oqtane.UI
|
||||
}
|
||||
}
|
||||
|
||||
public Task RemoveElementsById(string prefix, string first, string last)
|
||||
{
|
||||
try
|
||||
{
|
||||
_jsRuntime.InvokeVoidAsync(
|
||||
"Oqtane.Interop.removeElementsById",
|
||||
prefix, first, last);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
public ValueTask<string> GetElementByName(string name)
|
||||
{
|
||||
try
|
||||
|
Reference in New Issue
Block a user