1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2024-11-25 05:42:47 +01:00
TweetDuck/linux/TweetImpl.CefGlue/Adapters/CefFrameAdapter.cs
2022-02-19 18:19:13 +01:00

27 lines
646 B
C#

using TweetLib.Browser.CEF.Interfaces;
using Xilium.CefGlue;
namespace TweetImpl.CefGlue.Adapters {
sealed class CefFrameAdapter : IFrameAdapter<CefFrame> {
public static CefFrameAdapter Instance { get; } = new ();
private CefFrameAdapter() {}
public bool IsValid(CefFrame frame) {
return frame.IsValid;
}
public bool IsMain(CefFrame frame) {
return frame.IsMain;
}
public void LoadUrl(CefFrame frame, string url) {
frame.LoadUrl(url);
}
public void ExecuteJavaScriptAsync(CefFrame frame, string script, string identifier, int startLine = 1) {
frame.ExecuteJavaScript(script, identifier, startLine);
}
}
}