mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[spidermonkey] getElementsBy*Name return empty array not null
This commit is contained in:
parent
e1ba4bf951
commit
e9b897f4a5
@ -1848,11 +1848,6 @@ document_getElementsByClassName(JSContext *ctx, unsigned int argc, JS::Value *vp
|
||||
|
||||
*elements = root->find(xpath);
|
||||
|
||||
if (elements->size() == 0) {
|
||||
args.rval().setNull();
|
||||
return true;
|
||||
}
|
||||
|
||||
JSObject *elem = getCollection(ctx, elements);
|
||||
|
||||
if (elem) {
|
||||
@ -1912,11 +1907,6 @@ document_getElementsByName(JSContext *ctx, unsigned int argc, JS::Value *vp)
|
||||
|
||||
*elements = root->find(xpath);
|
||||
|
||||
if (elements->size() == 0) {
|
||||
args.rval().setNull();
|
||||
return true;
|
||||
}
|
||||
|
||||
JSObject *elem = getCollection(ctx, elements);
|
||||
|
||||
if (elem) {
|
||||
@ -1973,11 +1963,6 @@ document_getElementsByTagName(JSContext *ctx, unsigned int argc, JS::Value *vp)
|
||||
|
||||
*elements = root->find(xpath);
|
||||
|
||||
if (elements->size() == 0) {
|
||||
args.rval().setNull();
|
||||
return true;
|
||||
}
|
||||
|
||||
JSObject *elem = getCollection(ctx, elements);
|
||||
|
||||
if (elem) {
|
||||
|
Loading…
Reference in New Issue
Block a user