diff options
author | portix <portix@gmx.net> | 2012-09-30 10:58:49 +0200 |
---|---|---|
committer | portix <portix@gmx.net> | 2012-09-30 10:58:49 +0200 |
commit | c07c1a6a5f76cca0861dad25823e2b61ffd5b941 (patch) | |
tree | 2236b6f79ea978e8d86230f1964830517fe3cad1 /src/js.c | |
parent | 3766f55ac54b228782f82e981416cc06f9b30bb8 (diff) | |
parent | 7d0376d67895abcddd7e540c61f458400c91e1a6 (diff) | |
download | dwb-c07c1a6a5f76cca0861dad25823e2b61ffd5b941.zip |
Automated merge with ssh://bitbucket.org/portix/dwb
Diffstat (limited to 'src/js.c')
-rw-r--r-- | src/js.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -33,6 +33,12 @@ js_make_exception(JSContextRef ctx, JSValueRef *exception, const gchar *format, } void +js_set_property(JSContextRef ctx, JSObjectRef arg, const char *name, JSValueRef prop, JSClassAttributes attributes, JSValueRef *exc) { + JSStringRef js_key = JSStringCreateWithUTF8CString(name); + JSObjectSetProperty(ctx, arg, js_key, prop, attributes, exc); + JSStringRelease(js_key); +} +void js_set_object_property(JSContextRef ctx, JSObjectRef arg, const char *name, const char *value, JSValueRef *exc) { JSStringRef js_key = JSStringCreateWithUTF8CString(name); JSValueRef js_value = js_char_to_value(ctx, value); |