@@ -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.
@@ -2848,7 +2857,7 @@ abstract class Document
2848
2857
*
2849
2858
* MDN
2850
2859
*/
2851
- def getElementsByTagName (tagname : String ): NodeList = js.native
2860
+ def getElementsByTagName (name : String ): HTMLCollection = js.native
2852
2861
2853
2862
/**
2854
2863
* Returns a list of elements with the given tag name belonging to the given namespace.
@@ -2857,7 +2866,7 @@ abstract class Document
2857
2866
* MDN
2858
2867
*/
2859
2868
def getElementsByTagNameNS (namespaceURI : String ,
2860
- localName : String ): NodeList = js.native
2869
+ localName : String ): HTMLCollection = js.native
2861
2870
2862
2871
/**
2863
2872
* Returns a set of elements which have all the given class names. When called on the
@@ -2867,7 +2876,7 @@ abstract class Document
2867
2876
*
2868
2877
* MDN
2869
2878
*/
2870
- def getElementsByClassName (classNames : String ): NodeList = js.native
2879
+ def getElementsByClassName (classNames : String ): HTMLCollection = js.native
2871
2880
2872
2881
/**
2873
2882
* Returns the element from the document whose elementFromPoint method is being
0 commit comments