History

added basic implementation of WebSocket class ( https://developer.mozilla.org/en-US/docs/Web/API/WebSocket ) using QWebSocket

Thijs Wenker committed 11 years ago

Commit 25266b91 parent 597316b5 files · +206 −2Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 5 files). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+4−0
@@ -39,6 +39,7 @@ · 38 unmodified lines
3939 #include "ScriptEngine.h"
4040 #include "TypedArrays.h"
4141 #include "XMLHttpRequestClass.h"
42+#include "WebSocketClass.h"
4243
4344 #include "SceneScriptingInterface.h"
4445
@@ -344,6 +345,9 @@ void ScriptEngine::init() { · 299 unmodified lines
344345 QScriptValue xmlHttpRequestConstructorValue = newFunction(XMLHttpRequestClass::constructor);
345346 globalObject().setProperty("XMLHttpRequest", xmlHttpRequestConstructorValue);
346347
348+ QScriptValue webSocketConstructorValue = newFunction(WebSocketClass::constructor);
349+ globalObject().setProperty("WebSocket", webSocketConstructorValue);
350+
347351 QScriptValue printConstructorValue = newFunction(debugPrint);
348352 globalObject().setProperty("print", printConstructorValue);
349353