-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add JS DOM utils to Scaladoc-js #14595
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
Conversation
1faf597
to
39e3fcf
Compare
val testId = Attr("data-test-id") | ||
val alt = Attr("alt") | ||
val value = Attr("value") | ||
val onclick=Attr("onclick") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also: i'd use onClick
val b = Tag[domhtml.Element]("b") | ||
val i = Tag[domhtml.Element]("i") | ||
|
||
val cls = Attr("class") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class, we do not code in C++ to count every character we type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class
is a keyword and I didn't want to type:
`class`
in every tag
@@ -178,22 +155,16 @@ class CodeSnippets: | |||
case btn: html.Element => btn.parentElement.style = "display:none;" | |||
case _ => | |||
} | |||
div.style = "display:none;" | |||
bdiv.style = "display:none;" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldnt be this event listerner block inlined in exitButton
using tap
?
import org.scalajs.dom._ | ||
import org.scalajs.dom.ext._ | ||
import org.scalajs.dom.html.Input | ||
import scala.scalajs.js.timers._ | ||
import scala.concurrent.duration._ | ||
import scala.concurrent.duration.{span => dspan, _} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dspan
seems unused. Can we just import things we need or import span => _
?
No description provided.