summaryrefslogtreecommitdiff
path: root/system/include
diff options
context:
space:
mode:
Diffstat (limited to 'system/include')
-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 {