diff options
author | portix <portix@gmx.net> | 2012-12-07 17:07:31 +0100 |
---|---|---|
committer | portix <portix@gmx.net> | 2012-12-07 17:07:31 +0100 |
commit | 7b2ea8073aea6ab4a5d593d8be8bed923b6329fb (patch) | |
tree | 49c88ebc0e305a16139b1101376442f69dbd24d3 /src/js.c | |
parent | 6d228d4ff707158db60197592d7b231737f890c3 (diff) | |
download | dwb-7b2ea8073aea6ab4a5d593d8be8bed923b6329fb.zip |
Implementing Deferreds
Diffstat (limited to 'src/js.c')
-rw-r--r-- | src/js.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -332,4 +332,12 @@ js_array_iterator_next(js_array_iterator *iter, JSValueRef *exc) return JSObjectGetPropertyAtIndex(iter->ctx, iter->array, iter->current_index++, exc); } +JSObjectRef +js_value_to_function(JSContextRef ctx, JSValueRef val, JSValueRef *exc) +{ + JSObjectRef ret = JSValueToObject(ctx, val, exc); + if (ret != NULL && JSObjectIsFunction(ctx, ret)) + return ret; + return NULL; +} |