1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2024-11-23 17:42:46 +01:00
TweetDuck/windows/TweetImpl.CefSharp/Adapters/CefFrameAdapter.cs

27 lines
636 B
C#

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