mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[ecmascript] placeholder for CSSStyleDeclaration.getPropertyValue
It returns undefined.
This commit is contained in:
parent
78b7499f52
commit
6f4e30f8b6
@ -40,6 +40,15 @@ mjs_push_CSSStyleDeclaration_item2(js_State *J, int idx)
|
||||
js_pushstring(J, "0"); // fake
|
||||
}
|
||||
|
||||
static void
|
||||
mjs_CSSStyleDeclaration_getPropertyValue(js_State *J)
|
||||
{
|
||||
#ifdef ECMASCRIPT_DEBUG
|
||||
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
|
||||
#endif
|
||||
js_pushundefined(J); // fake
|
||||
}
|
||||
|
||||
static void
|
||||
mjs_CSSStyleDeclaration_item(js_State *J)
|
||||
{
|
||||
@ -104,6 +113,7 @@ mjs_push_CSSStyleDeclaration(js_State *J, void *node)
|
||||
js_newarray(J);
|
||||
{
|
||||
js_newuserdata(J, "CSSStyleDeclaration", node, mjs_CSSStyleDeclaration_finalizer);
|
||||
addmethod(J, "getPropertyValue", mjs_CSSStyleDeclaration_getPropertyValue, 1);
|
||||
addmethod(J, "item", mjs_CSSStyleDeclaration_item, 1);
|
||||
addmethod(J, "namedItem", mjs_CSSStyleDeclaration_namedItem, 1);
|
||||
addmethod(J, "toString", mjs_CSSStyleDeclaration_toString, 0);
|
||||
|
@ -58,6 +58,17 @@ js_CSSStyleDeclaration_get_property_length(JSContext *ctx, JSValueConst this_val
|
||||
return JS_NewInt32(ctx, 3); // fake
|
||||
}
|
||||
|
||||
static JSValue
|
||||
js_CSSStyleDeclaration_getPropertyValue(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
|
||||
{
|
||||
#ifdef ECMASCRIPT_DEBUG
|
||||
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
|
||||
#endif
|
||||
REF_JS(this_val);
|
||||
|
||||
return JS_UNDEFINED;
|
||||
}
|
||||
|
||||
static JSValue
|
||||
js_CSSStyleDeclaration_item2(JSContext *ctx, JSValueConst this_val, int idx)
|
||||
{
|
||||
@ -133,6 +144,7 @@ js_CSSStyleDeclaration_toString(JSContext *ctx, JSValueConst this_val, int argc,
|
||||
|
||||
static const JSCFunctionListEntry js_CSSStyleDeclaration_proto_funcs[] = {
|
||||
JS_CGETSET_DEF("length", js_CSSStyleDeclaration_get_property_length, NULL),
|
||||
JS_CFUNC_DEF("getPropertyValue", 1, js_CSSStyleDeclaration_getPropertyValue),
|
||||
JS_CFUNC_DEF("item", 1, js_CSSStyleDeclaration_item),
|
||||
JS_CFUNC_DEF("namedItem", 1, js_CSSStyleDeclaration_namedItem),
|
||||
JS_CFUNC_DEF("toString", 0, js_CSSStyleDeclaration_toString)
|
||||
|
@ -54,6 +54,7 @@
|
||||
|
||||
|
||||
static bool CSSStyleDeclaration_item(JSContext *ctx, unsigned int argc, JS::Value *rval);
|
||||
static bool CSSStyleDeclaration_getPropertyValue(JSContext *ctx, unsigned int argc, JS::Value *rval);
|
||||
static bool CSSStyleDeclaration_namedItem(JSContext *ctx, unsigned int argc, JS::Value *rval);
|
||||
static bool CSSStyleDeclaration_item2(JSContext *ctx, JS::HandleObject hobj, int index, JS::MutableHandleValue hvp);
|
||||
static bool CSSStyleDeclaration_namedItem2(JSContext *ctx, JS::HandleObject hobj, char *str, JS::MutableHandleValue hvp);
|
||||
@ -85,6 +86,7 @@ JSClass CSSStyleDeclaration_class = {
|
||||
};
|
||||
|
||||
static const spidermonkeyFunctionSpec CSSStyleDeclaration_funcs[] = {
|
||||
{ "getPropertyValue", CSSStyleDeclaration_getPropertyValue, 1 },
|
||||
{ "item", CSSStyleDeclaration_item, 1 },
|
||||
{ "namedItem", CSSStyleDeclaration_namedItem, 1 },
|
||||
{ NULL }
|
||||
@ -120,6 +122,18 @@ CSSStyleDeclaration_get_property_length(JSContext *ctx, unsigned int argc, JS::V
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
CSSStyleDeclaration_getPropertyValue(JSContext *ctx, unsigned int argc, JS::Value *vp)
|
||||
{
|
||||
#ifdef ECMASCRIPT_DEBUG
|
||||
fprintf(stderr, "%s:%s\n", __FILE__, __FUNCTION__);
|
||||
#endif
|
||||
JS::CallArgs args = CallArgsFromVp(argc, vp);
|
||||
args.rval().setUndefined();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
CSSStyleDeclaration_item(JSContext *ctx, unsigned int argc, JS::Value *vp)
|
||||
{
|
||||
@ -138,6 +152,7 @@ CSSStyleDeclaration_item(JSContext *ctx, unsigned int argc, JS::Value *vp)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static bool
|
||||
CSSStyleDeclaration_namedItem(JSContext *ctx, unsigned int argc, JS::Value *vp)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user