Anyone have issues using the `Iframe` builder in 1...
# compose-web
c
Anyone have issues using the
Iframe
builder in 1.0.0? It seems that IntelliJ can't resolve the attributes within the attribute builder which is odd since you can see the inlay hints are registering and I see them in the definition source in the IDE...
Welp I "reimplemented" it again since I couldn't get it to build, even though the code looks very redundant 🤷🏻‍♂️ https://github.com/c5inco/portfolio-compose/blob/main/src/jsMain/kotlin/com/c5inco/portfolio/components/Iframe.kt
u
Нey Chris! It looks like there’s a room for improvement on our side. The thing is that we are passing to the element build AttrBuilderContext<HTMLIFrameElement> which is not the same thing as HTMLIFrameElement for some context, like, say, HTMLImageElement we’ve explicitely added extensions like
Copy code
fun AttrsBuilder<HTMLImageElement>.alt(value: String): AttrsBuilder<HTMLImageElement> =
    attr("alt", value)
but for some we don’t. I think that’s a fair assumption that user still expect this behaviour so we’ll consider how to address this. The cheapest thing would be to just add extension functions for everything but we’ll see whether we can do something better.
👍 1
c
Ah I see - yeah that is much simpler than create another element. I removed my Iframe function and just added three extensions instead!