1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

[spidermonkey] getElementsBy*Name return empty array not null

This commit is contained in:
Witold Filipczyk 2021-10-15 19:23:17 +02:00
parent e1ba4bf951
commit e9b897f4a5

View File

@ -1848,11 +1848,6 @@ document_getElementsByClassName(JSContext *ctx, unsigned int argc, JS::Value *vp
*elements = root->find(xpath); *elements = root->find(xpath);
if (elements->size() == 0) {
args.rval().setNull();
return true;
}
JSObject *elem = getCollection(ctx, elements); JSObject *elem = getCollection(ctx, elements);
if (elem) { if (elem) {
@ -1912,11 +1907,6 @@ document_getElementsByName(JSContext *ctx, unsigned int argc, JS::Value *vp)
*elements = root->find(xpath); *elements = root->find(xpath);
if (elements->size() == 0) {
args.rval().setNull();
return true;
}
JSObject *elem = getCollection(ctx, elements); JSObject *elem = getCollection(ctx, elements);
if (elem) { if (elem) {
@ -1973,11 +1963,6 @@ document_getElementsByTagName(JSContext *ctx, unsigned int argc, JS::Value *vp)
*elements = root->find(xpath); *elements = root->find(xpath);
if (elements->size() == 0) {
args.rval().setNull();
return true;
}
JSObject *elem = getCollection(ctx, elements); JSObject *elem = getCollection(ctx, elements);
if (elem) { if (elem) {