mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Robust.Client.CEF Renamed to Robust.Client.WebView since CEF should really be an implementation detail. Content is no longer responsible for initializing and managing the module, this is done automatically by the engine. WebView is initialized by declaring it in a manifest.yml file in the game resources. In the future the launcher will read this same file to manage WebView module versions. CefManager has been made private and the content-visible API is now IWebViewManager.
49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
using System;
|
|
|
|
namespace Robust.Client.WebView
|
|
{
|
|
public interface IWebViewControl
|
|
{
|
|
/// <summary>
|
|
/// Current URL of the browser. Set to load a new page.
|
|
/// </summary>
|
|
string Url { get; set; }
|
|
|
|
/// <summary>
|
|
/// Whether the browser is currently loading a page.
|
|
/// </summary>
|
|
bool IsLoading { get; }
|
|
|
|
/// <summary>
|
|
/// Stops loading the current page.
|
|
/// </summary>
|
|
void StopLoad();
|
|
|
|
/// <summary>
|
|
/// Reload the current page.
|
|
/// </summary>
|
|
void Reload();
|
|
|
|
/// <summary>
|
|
/// Navigate back.
|
|
/// </summary>
|
|
/// <returns>Whether the browser could navigate back.</returns>
|
|
bool GoBack();
|
|
|
|
/// <summary>
|
|
/// Navigate forward.
|
|
/// </summary>
|
|
/// <returns>Whether the browser could navigate forward.</returns>
|
|
bool GoForward();
|
|
|
|
/// <summary>
|
|
/// Execute arbitrary JavaScript on the current page.
|
|
/// </summary>
|
|
/// <param name="code">JavaScript code.</param>
|
|
void ExecuteJavaScript(string code);
|
|
|
|
void AddResourceRequestHandler(Action<RequestHandlerContext> handler);
|
|
void RemoveResourceRequestHandler(Action<RequestHandlerContext> handler);
|
|
}
|
|
}
|