aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorChad Austin <chad@imvu.com>2013-01-22 18:02:56 -0800
committerJukka Jylänki <jujjyl@gmail.com>2013-04-12 14:23:30 +0300
commit50e05c30bfcdf3b1c8aea0be0b631233e24f694c (patch)
treec8e58b07f47875a12a45c8b690dbb6d04cee8394 /system
parentbacb23ed1a80740b34e3a265a29be1d86dd72ff0 (diff)
Introduce val::new_ for constructor invocation
Diffstat (limited to 'system')
-rw-r--r--system/include/emscripten/val.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/system/include/emscripten/val.h b/system/include/emscripten/val.h
index 3d0a3e60..22a7776a 100644
--- a/system/include/emscripten/val.h
+++ b/system/include/emscripten/val.h
@@ -19,6 +19,8 @@ namespace emscripten {
EM_VAL _emval_new_cstring(const char*);
void _emval_take_value(TYPEID type/*, ...*/);
+ EM_VAL _emval_new(EM_VAL value);
+
EM_VAL _emval_get_global(const char* name);
EM_VAL _emval_get_property(EM_VAL object, EM_VAL key);
void _emval_set_property(EM_VAL object, EM_VAL key, EM_VAL value);
@@ -102,6 +104,10 @@ namespace emscripten {
bool hasOwnProperty(const char* key) const {
return val::global("Object")["prototype"]["hasOwnProperty"].call("call", *this, val(key)).as<bool>();
}
+
+ val new_() const {
+ return val(internal::_emval_new(handle));
+ }
template<typename T>
val operator[](const T& key) const {