mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
[js] Rewrite a bit form get_property
This commit is contained in:
parent
28127b29b4
commit
3e7047ee47
@ -47,6 +47,7 @@
|
|||||||
#include "viewer/text/link.h"
|
#include "viewer/text/link.h"
|
||||||
#include "viewer/text/vs.h"
|
#include "viewer/text/vs.h"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
//static JSClass form_class; /* defined below */
|
//static JSClass form_class; /* defined below */
|
||||||
|
|
||||||
@ -1671,6 +1672,11 @@ form_elements_get_property(JSContext *ctx, JS::HandleObject hobj, JS::HandleId h
|
|||||||
JS_IdToValue(ctx, id, &r_idval);
|
JS_IdToValue(ctx, id, &r_idval);
|
||||||
char *string = JS_EncodeString(ctx, r_idval.toString());
|
char *string = JS_EncodeString(ctx, r_idval.toString());
|
||||||
|
|
||||||
|
std::string test = string;
|
||||||
|
if (test == "item" || test == "namedItem") {
|
||||||
|
return JS_PropertyStub(ctx, hobj, hid, hvp);
|
||||||
|
}
|
||||||
|
|
||||||
form_elements_namedItem2(ctx, hobj, string, hvp);
|
form_elements_namedItem2(ctx, hobj, string, hvp);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user