Prechádzať zdrojové kódy

root fixes for getElementsByName

Ivan Asmer 8 rokov pred
rodič
commit
d4f281926c
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      static/nb.js

+ 1 - 1
static/nb.js

@@ -24,7 +24,7 @@ function nbInit(a,b){
             items = root.querySelectorAll("#" + selector); 
             items = root.querySelectorAll("#" + selector); 
         }
         }
         items     = items[0]     ? items :  root.querySelectorAll(selector);
         items     = items[0]     ? items :  root.querySelectorAll(selector);
-        items     = items.length ? items :  root === document ? root.getElementsByName(selector) ? root.querySelectorAll("['name'='" + selector + "']"); 
+        items     = items.length ? items :  root === document ? root.getElementsByName(selector) : root.querySelectorAll("['name'='" + selector + "']"); 
         items     = items.length ? items :  root.getElementsByClassName(selector); 
         items     = items.length ? items :  root.getElementsByClassName(selector); 
         return items;
         return items;
     }
     }