diff options
author | portix <none@none> | 2012-09-19 01:40:28 +0200 |
---|---|---|
committer | portix <none@none> | 2012-09-19 01:40:28 +0200 |
commit | aa6745301d8dcd1a8bdeaa4dc649f1be9f9a8437 (patch) | |
tree | 79c37913b9ea35944b490021f516238f409f2f11 /src/js.c | |
parent | 3e6ba3478f1200df7d7cd5ccd57728e3f5122be9 (diff) | |
download | dwb-aa6745301d8dcd1a8bdeaa4dc649f1be9f9a8437.zip |
implementing scratchpad_show/scratchpad_hide
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); |