diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-06-21 09:14:06 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-06-21 09:14:06 (GMT) |
commit | 8e3cca4a153a5178a77ae6956292606563f4b8fe (patch) | |
tree | 89537d5153690ee0d9a7b0038b1280f407f70dc3 /src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.cpp | |
parent | 794575f01ce5a6bf7e377eb815f3def5aded74f5 (diff) | |
download | uscxml-8e3cca4a153a5178a77ae6956292606563f4b8fe.zip uscxml-8e3cca4a153a5178a77ae6956292606563f4b8fe.tar.gz uscxml-8e3cca4a153a5178a77ae6956292606563f4b8fe.tar.bz2 |
More work on JSC implementation for ecma datamodel
Diffstat (limited to 'src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.cpp')
-rw-r--r-- | src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.cpp | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.cpp index 7c72faf..c2b56c1 100644 --- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.cpp +++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/dom/JSCNodeSet.cpp @@ -16,17 +16,30 @@ JSStaticFunction JSCNodeSet::staticFunctions[] = { { 0, 0, 0 } }; -JSValueRef JSCNodeSet::sizeAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception) { - struct JSCNodeSetPrivate* privData = static_cast<JSCNodeSet::JSCNodeSetPrivate* >(JSObjectGetPrivate(thisObj)); +JSValueRef JSCNodeSet::sizeAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { + struct JSCNodeSetPrivate* privData = (struct JSCNodeSetPrivate*)JSObjectGetPrivate(object); - return JSValueMakeNumber(ctx, privData->arabicaThis->size()); + return JSValueMakeNumber(ctx, privData->nativeObj->size()); } -JSValueRef JSCNodeSet::emptyAttrGetter(JSContextRef ctx, JSObjectRef thisObj, JSStringRef propertyName, JSValueRef* exception) { - struct JSCNodeSetPrivate* privData = static_cast<JSCNodeSet::JSCNodeSetPrivate* >(JSObjectGetPrivate(thisObj)); - return JSValueMakeBoolean(ctx, privData->arabicaThis->empty()); +JSValueRef JSCNodeSet::emptyAttrGetter(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef *exception) { + struct JSCNodeSetPrivate* privData = (struct JSCNodeSetPrivate*)JSObjectGetPrivate(object); + + return JSValueMakeNumber(ctx, privData->nativeObj->empty()); +} + +JSValueRef JSCNodeSet::toDocumentOrderCallback(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObj, size_t argumentCount, const JSValueRef* arguments, JSValueRef* exception) { + + struct JSCNodeSetPrivate* privData = (struct JSCNodeSetPrivate*)JSObjectGetPrivate(thisObj); + + + privData->nativeObj->to_document_order(); + + JSValueRef jscRetVal = JSValueMakeUndefined(ctx); + return jscRetVal; } + } } |