Skip to content

how to convert HtmlElement to HtmlTag? #310

Closed Answered by armanbilge
cyz1901 asked this question in Q&A
Discussion options

You must be logged in to vote

Try like this:

webglCanvans.flatTap(_.modify(cls := "w-[100%] h-[100%]"))

You cannot convert an HtmlElement to an HtmlTag, so instead the modify syntax is used to modify it post-facto.

inline def modify[F[_], A](a: A)(using m: Modifier[F, E, A]): Resource[F, Unit] =

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cyz1901
Comment options

Answer selected by cyz1901
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #309 on September 28, 2023 14:21.