1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

DOM: node was unitialized.

This commit is contained in:
Witold Filipczyk 2007-05-20 21:03:15 +02:00 committed by Witold Filipczyk
parent ca62325a53
commit f70e438820

View File

@ -137,6 +137,11 @@ Element_setAttributeNode(JSContext *ctx, JSObject *obj, uintN argc, jsval *argv,
if (!obj || (!JS_InstanceOf(ctx, obj, (JSClass *)&Element_class, NULL))
|| argc != 1)
return JS_FALSE;
node = JS_GetPrivate(ctx, obj);
if (!node)
return JS_FALSE;
attr = JSVAL_TO_OBJECT(argv[0]);
if (!JS_InstanceOf(ctx, attr, (JSClass *)&Attr_class, NULL))
return JS_FALSE;
@ -172,6 +177,11 @@ Element_removeAttributeNode(JSContext *ctx, JSObject *obj, uintN argc, jsval *ar
if (!obj || (!JS_InstanceOf(ctx, obj, (JSClass *)&Element_class, NULL))
|| argc != 1)
return JS_FALSE;
node = JS_GetPrivate(ctx, obj);
if (!node)
return JS_FALSE;
attr = JSVAL_TO_OBJECT(argv[0]);
if (!JS_InstanceOf(ctx, attr, (JSClass *)&Attr_class, NULL))
return JS_FALSE;