18 lines
376 B
C#
18 lines
376 B
C#
using Microsoft.JSInterop;
|
|
|
|
namespace Moonlight.Core.Services.Interop;
|
|
|
|
public class ClipboardService
|
|
{
|
|
private readonly IJSRuntime JsRuntime;
|
|
|
|
public ClipboardService(IJSRuntime jsRuntime)
|
|
{
|
|
JsRuntime = jsRuntime;
|
|
}
|
|
|
|
public async Task Copy(string content)
|
|
{
|
|
await JsRuntime.InvokeVoidAsync("moonlight.clipboard.copy", content);
|
|
}
|
|
} |