scala-js / scala-js-dom

Statically typed DOM API for Scala.js
Other
315 stars 160 forks source link

Add upgrade() whenDefined() to CustomElementRegistry #831

Open cyz1901 opened 6 months ago

cyz1901 commented 6 months ago

Hi there!

Before submitting a PR containing any Scala changes, please make sure you...

Thanks for contributing!

add upgrade() whenDefined() to CustomElementRegistry

cyz1901 commented 6 months ago

Hello team. I am not sure should we also add the get() and getName() functions, which seems to involve the type being a constructor...

armanbilge commented 6 months ago

Hmm. I think the type for a constructor should be js.Dynamic. For example see val constructor in this API: https://www.scala-js.org/api/scalajs-library/latest/scala/scalajs/js/ConstructorTag.html

cyz1901 commented 6 months ago

Hmm. I think the type for a constructor should be js.Dynamic. For example see val constructor in this API: https://www.scala-js.org/api/scalajs-library/latest/scala/scalajs/js/ConstructorTag.html

Added

cyz1901 commented 4 months ago

fixed