Updated to latest LuaScript
This commit is contained in:
@@ -196,7 +196,6 @@ public final class ClientImpl extends ProtocolWebClient {
|
||||
Map<String, String> headers,
|
||||
long totalLength) {
|
||||
|
||||
System.out.println("stream start");
|
||||
if (streams.size() >= MAX_CONCURRENT_STREAMS) {
|
||||
throw new IllegalStateException("Too many concurrent streams");
|
||||
}
|
||||
|
||||
@@ -5,9 +5,7 @@ import javafx.scene.web.WebEngine;
|
||||
import javafx.scene.web.WebView;
|
||||
import org.luaj.vm2.Globals;
|
||||
import org.luaj.vm2.LuaError;
|
||||
import org.openautonomousconnection.luascript.fx.FxDomHost;
|
||||
import org.openautonomousconnection.luascript.fx.FxEventHost;
|
||||
import org.openautonomousconnection.luascript.fx.FxWebViewResourceHost;
|
||||
import org.openautonomousconnection.luascript.fx.*;
|
||||
import org.openautonomousconnection.luascript.hosts.HostServices;
|
||||
import org.openautonomousconnection.luascript.runtime.LuaRuntime;
|
||||
import org.openautonomousconnection.luascript.security.LuaExecutionPolicy;
|
||||
@@ -95,11 +93,26 @@ public final class FxEngine implements AutoCloseable {
|
||||
.sandbox(true)
|
||||
);
|
||||
|
||||
ConsoleHostImpl console = new ConsoleHostImpl(logger);
|
||||
UiHostImpl uiHost = new UiHostImpl(engine, webView, dom);
|
||||
FxWebViewResourceHost resourceHost = new FxWebViewResourceHost(engine);
|
||||
FxEventHost eventHost = new FxEventHost(dom);
|
||||
HostServices services = new HostServices.Default(uiHost, dom, eventHost, resourceHost, console);
|
||||
HostServices services = new HostServices.Default(
|
||||
new FxUiHost(engine, dom),
|
||||
dom,
|
||||
eventHost,
|
||||
new FxWebViewResourceHost(engine),
|
||||
new ConsoleHostImpl(logger),
|
||||
new FxAudioHost(),
|
||||
new FxImageHost(engine, dom),
|
||||
new FxVideoHost(engine, dom),
|
||||
new FxSchedulerHost(),
|
||||
new FxSelectorHost(engine, dom),
|
||||
new FxGeometryHost(engine, dom),
|
||||
new FxCssHost(engine, dom),
|
||||
new FxStorageHost(engine, dom),
|
||||
new FxUtilHost(engine, dom),
|
||||
new FxClipboardHost(),
|
||||
new FxObserverHost(engine, dom)
|
||||
);
|
||||
|
||||
LuaRuntime rt = new LuaRuntime(globals, services, policy);
|
||||
eventHost.setRouter(rt.eventRouter());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user