2018-04-16 20:52:12 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Ooui
|
|
|
|
|
{
|
|
|
|
|
public class Document : EventTarget
|
|
|
|
|
{
|
|
|
|
|
public Window Window { get; } = new Window ();
|
|
|
|
|
public Body Body { get; } = new Body ();
|
|
|
|
|
|
|
|
|
|
public Document ()
|
|
|
|
|
: base ("document")
|
|
|
|
|
{
|
|
|
|
|
Id = "document";
|
|
|
|
|
Window.MessageSent += Proxy_MessageSent;
|
|
|
|
|
Body.MessageSent += Proxy_MessageSent;
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-16 21:02:41 +00:00
|
|
|
|
public void ReleaseCapture ()
|
|
|
|
|
{
|
|
|
|
|
Call ("releaseCapture");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ExecCommand (string commandName, bool showDefaultUI, string valueArgument = null)
|
|
|
|
|
{
|
|
|
|
|
Call ("execCommand", commandName, showDefaultUI, valueArgument);
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-16 20:52:12 +00:00
|
|
|
|
void Proxy_MessageSent (Message message)
|
|
|
|
|
{
|
|
|
|
|
Send (message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|