Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 5 files). Show all
Unified · Split
| @@ -39,6 +39,7 @@ · 38 unmodified lines | ||
| 39 | 39 | #include "ScriptEngine.h" |
| 40 | 40 | #include "TypedArrays.h" |
| 41 | 41 | #include "XMLHttpRequestClass.h" |
| 42 | +#include "WebSocketClass.h" | |
| 42 | 43 | |
| 43 | 44 | #include "SceneScriptingInterface.h" |
| 44 | 45 | |
| @@ -344,6 +345,9 @@ void ScriptEngine::init() { · 299 unmodified lines | ||
| 344 | 345 | QScriptValue xmlHttpRequestConstructorValue = newFunction(XMLHttpRequestClass::constructor); |
| 345 | 346 | globalObject().setProperty("XMLHttpRequest", xmlHttpRequestConstructorValue); |
| 346 | 347 | |
| 348 | + QScriptValue webSocketConstructorValue = newFunction(WebSocketClass::constructor); | |
| 349 | + globalObject().setProperty("WebSocket", webSocketConstructorValue); | |
| 350 | + | |
| 347 | 351 | QScriptValue printConstructorValue = newFunction(debugPrint); |
| 348 | 352 | globalObject().setProperty("print", printConstructorValue); |
| 349 | 353 | |