@@ -804,15 +804,35 @@ abstract class Element
804
804
*/
805
805
def getAttribute (name : String ): String = js.native
806
806
807
+ /**
808
+ * Returns a list of elements with the given tag name. The subtree underneath the
809
+ * specified element is searched, excluding the element itself. The returned list is
810
+ * live, meaning that it updates itself with the DOM tree automatically.
811
+ * Consequently, there is no need to call several times
812
+ * element.getElementsByTagName with the same element and arguments.
813
+ *
814
+ * MDN
815
+ */
816
+ def getElementsByTagName (name : String ): HTMLCollection = js.native
817
+
807
818
/**
808
819
* Returns a list of elements with the given tag name belonging to the given namespace.
809
820
*
810
821
* MDN
811
822
*/
812
823
def getElementsByTagNameNS (namespaceURI : String ,
813
- localName : String ): NodeList = js.native
824
+ localName : String ): HTMLCollection = js.native
814
825
815
- def getElementsByClassName (classNames : String ): NodeList = js.native
826
+ /**
827
+ * Returns an array-like object of all child elements which have all of the
828
+ * given class names. When called on the document object, the complete document
829
+ * is searched, including the root node. You may also call getElementsByClassName()
830
+ * on any element; it will return only elements which are descendants of the
831
+ * specified root element with the given class names.
832
+ *
833
+ * MDN
834
+ */
835
+ def getElementsByClassName (classNames : String ): HTMLCollection = js.native
816
836
817
837
/**
818
838
* hasAttributeNS returns a boolean value indicating whether the current element
@@ -886,17 +906,6 @@ abstract class Element
886
906
*/
887
907
def getAttributeNode (name : String ): Attr = js.native
888
908
889
- /**
890
- * Returns a list of elements with the given tag name. The subtree underneath the
891
- * specified element is searched, excluding the element itself. The returned list is
892
- * live, meaning that it updates itself with the DOM tree automatically.
893
- * Consequently, there is no need to call several times
894
- * element.getElementsByTagName with the same element and arguments.
895
- *
896
- * MDN
897
- */
898
- def getElementsByTagName (name : String ): NodeList = js.native
899
-
900
909
/**
901
910
* Returns a collection of rectangles that indicate the bounding rectangles for each
902
911
* box in a client.
@@ -2850,7 +2859,7 @@ abstract class Document
2850
2859
*
2851
2860
* MDN
2852
2861
*/
2853
- def getElementsByTagName (tagname : String ): NodeList = js.native
2862
+ def getElementsByTagName (name : String ): HTMLCollection = js.native
2854
2863
2855
2864
/**
2856
2865
* Returns a list of elements with the given tag name belonging to the given namespace.
@@ -2859,7 +2868,7 @@ abstract class Document
2859
2868
* MDN
2860
2869
*/
2861
2870
def getElementsByTagNameNS (namespaceURI : String ,
2862
- localName : String ): NodeList = js.native
2871
+ localName : String ): HTMLCollection = js.native
2863
2872
2864
2873
/**
2865
2874
* Returns a set of elements which have all the given class names. When called on the
@@ -2869,7 +2878,7 @@ abstract class Document
2869
2878
*
2870
2879
* MDN
2871
2880
*/
2872
- def getElementsByClassName (classNames : String ): NodeList = js.native
2881
+ def getElementsByClassName (classNames : String ): HTMLCollection = js.native
2873
2882
2874
2883
/**
2875
2884
* Returns the element from the document whose elementFromPoint method is being
0 commit comments