Skip to content

Commit 1b07261

Browse files
committed
Rewrite HTMLOptionsCollection to extend HTMLCollection
1 parent 3d1f149 commit 1b07261

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/scala/org/scalajs/dom/HTMLCollection.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import scala.scalajs.js.annotation._
1414
*/
1515
@js.native
1616
@JSGlobal
17-
class HTMLCollection private[this] () extends DOMList[Element] {
17+
abstract class HTMLCollection extends DOMList[Element] {
1818
def item(index: Int): Element = js.native
1919

2020
/** Returns the specific node whose ID or, as a fallback, name matches the string specified by name. Matching by name

src/main/scala/org/scalajs/dom/HTMLOptionsCollection.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ import scala.scalajs.js.annotation._
1515
*/
1616
@js.native
1717
@JSGlobal
18-
class HTMLOptionsCollection private[this] () extends DOMList[HTMLOptionElement] {
19-
def item(index: Int): HTMLOptionElement = js.native
18+
class HTMLOptionsCollection private[this] () extends HTMLCollection {
19+
override def item(index: Int): HTMLOptionElement = js.native
2020

2121
/** Returns the specific node whose ID or, as a fallback, name matches the string specified by name. Matching by name
2222
* is only done as a last resort, only in HTML, and only if the referenced element supports the name attribute.
2323
* Returns null if no node exists by the given name.
2424
*/
25-
def namedItem(name: String): HTMLOptionElement = js.native
25+
override def namedItem(name: String): HTMLOptionElement = js.native
2626
}

0 commit comments

Comments
 (0)