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:
parent
e1ba4bf951
commit
e9b897f4a5
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user