Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all
Unified · Split
| @@ -34,6 +34,7 @@ · 33 unmodified lines | ||
| 34 | 34 | #include "MenuItemProperties.h" |
| 35 | 35 | #include "LocalVoxels.h" |
| 36 | 36 | #include "ScriptEngine.h" |
| 37 | +#include "XMLHttpRequestClass.h" | |
| 37 | 38 | |
| 38 | 39 | VoxelsScriptingInterface ScriptEngine::_voxelsScriptingInterface; |
| 39 | 40 | ParticlesScriptingInterface ScriptEngine::_particlesScriptingInterface; |
| @@ -214,6 +215,9 @@ void ScriptEngine::init() { · 174 unmodified lines | ||
| 214 | 215 | qScriptRegisterSequenceMetaType<QVector<glm::quat> >(&_engine); |
| 215 | 216 | qScriptRegisterSequenceMetaType<QVector<QString> >(&_engine); |
| 216 | 217 | |
| 218 | + QScriptValue xmlHttpRequestConstructorValue = _engine.newFunction(XMLHttpRequestClass::constructor); | |
| 219 | + _engine.globalObject().setProperty("XMLHttpRequest", xmlHttpRequestConstructorValue); | |
| 220 | + | |
| 217 | 221 | QScriptValue printConstructorValue = _engine.newFunction(debugPrint); |
| 218 | 222 | _engine.globalObject().setProperty("print", printConstructorValue); |
| 219 | 223 | |