Skip to content

Improve HTMLCollection and friends #599

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Oct 17, 2021
Prev Previous commit
Make HTMLCollection covariant in E
  • Loading branch information
armanbilge committed Oct 17, 2021
commit b4f15a651120c4d1717d5fca0a0fa0cefd450497
2 changes: 1 addition & 1 deletion api-reports/2_12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25826,7 +25826,7 @@ html[SO] type Base = HTMLBaseElement
html[SO] type Body = HTMLBodyElement
html[SO] type Button = HTMLButtonElement
html[SO] type Canvas = HTMLCanvasElement
html[SO] type Collection[E] = HTMLCollection[E]
html[SO] type Collection[+E] = HTMLCollection[E]
html[SO] type DList = HTMLDListElement
html[SO] type DataList = HTMLDataListElement
html[SO] type Div = HTMLDivElement
Expand Down
2 changes: 1 addition & 1 deletion api-reports/2_13.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25826,7 +25826,7 @@ html[SO] type Base = HTMLBaseElement
html[SO] type Body = HTMLBodyElement
html[SO] type Button = HTMLButtonElement
html[SO] type Canvas = HTMLCanvasElement
html[SO] type Collection[E] = HTMLCollection[E]
html[SO] type Collection[+E] = HTMLCollection[E]
html[SO] type DList = HTMLDListElement
html[SO] type DataList = HTMLDataListElement
html[SO] type Div = HTMLDivElement
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/org/scalajs/dom/HTMLCollection.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import scala.scalajs.js.annotation._
*/
@js.native
@JSGlobal
abstract class HTMLCollection[E] extends DOMList[E] {
abstract class HTMLCollection[+E] extends DOMList[E] {
def item(index: Int): E = js.native

/** Returns the specific node whose ID or, as a fallback, name matches the string specified by name. Matching by name
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/org/scalajs/dom/html.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ object html {
type Button = HTMLButtonElement
type BR = HTMLBRElement
type Canvas = HTMLCanvasElement
type Collection[E] = HTMLCollection[E]
type Collection[+E] = HTMLCollection[E]
type DataList = HTMLDataListElement
type Div = HTMLDivElement
type DList = HTMLDListElement
Expand Down