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 | #include "ScriptEngine.h" | 39 | #include "ScriptEngine.h" |
| 40 | #include "TypedArrays.h" | 40 | #include "TypedArrays.h" |
| 41 | #include "XMLHttpRequestClass.h" | 41 | #include "XMLHttpRequestClass.h" |
| 42 | #include "WebSocketClass.h" | ||
| 42 | 43 | ||
| 43 | #include "SceneScriptingInterface.h" | 44 | #include "SceneScriptingInterface.h" |
| 44 | 45 | ||
| @@ -344,6 +345,9 @@ void ScriptEngine::init() { · 299 unmodified lines | |||
| 344 | QScriptValue xmlHttpRequestConstructorValue = newFunction(XMLHttpRequestClass::constructor); | 345 | QScriptValue xmlHttpRequestConstructorValue = newFunction(XMLHttpRequestClass::constructor); |
| 345 | globalObject().setProperty("XMLHttpRequest", xmlHttpRequestConstructorValue); | 346 | globalObject().setProperty("XMLHttpRequest", xmlHttpRequestConstructorValue); |
| 346 | 347 | ||
| 348 | QScriptValue webSocketConstructorValue = newFunction(WebSocketClass::constructor); | ||
| 349 | globalObject().setProperty("WebSocket", webSocketConstructorValue); | ||
| 350 | |||
| 347 | QScriptValue printConstructorValue = newFunction(debugPrint); | 351 | QScriptValue printConstructorValue = newFunction(debugPrint); |
| 348 | globalObject().setProperty("print", printConstructorValue); | 352 | globalObject().setProperty("print", printConstructorValue); |
| 349 | 353 | ||