|
|
@ -13,54 +13,9 @@ import androidx.compose.runtime.remember |
|
|
|
import org.jetbrains.compose.web.DomApplier |
|
|
|
import org.jetbrains.compose.web.DomApplier |
|
|
|
import org.jetbrains.compose.web.DomElementWrapper |
|
|
|
import org.jetbrains.compose.web.DomElementWrapper |
|
|
|
import org.jetbrains.compose.web.attributes.AttrsBuilder |
|
|
|
import org.jetbrains.compose.web.attributes.AttrsBuilder |
|
|
|
import kotlinx.browser.document |
|
|
|
import org.jetbrains.compose.web.ExperimentalComposeWebApi |
|
|
|
import org.w3c.dom.Audio |
|
|
|
|
|
|
|
import org.w3c.dom.Element |
|
|
|
import org.w3c.dom.Element |
|
|
|
import org.w3c.dom.HTMLAnchorElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLAreaElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLAudioElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLBRElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLButtonElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLDataListElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLDivElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLElement |
|
|
|
import org.w3c.dom.HTMLElement |
|
|
|
import org.w3c.dom.HTMLEmbedElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLFieldSetElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLFormElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLHRElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLHeadingElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLIFrameElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLImageElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLInputElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLLIElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLLabelElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLLegendElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLMapElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLMeterElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLOListElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLObjectElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLOptGroupElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLOptionElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLOutputElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLParagraphElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLParamElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLPictureElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLPreElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLProgressElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLSelectElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLSourceElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLSpanElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLStyleElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLTableCaptionElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLTableCellElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLTableColElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLTableElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLTableRowElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLTableSectionElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLTextAreaElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLTrackElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLUListElement |
|
|
|
|
|
|
|
import org.w3c.dom.HTMLVideoElement |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@OptIn(ComposeCompilerApi::class) |
|
|
|
@OptIn(ComposeCompilerApi::class) |
|
|
|
@Composable |
|
|
|
@Composable |
|
|
@ -89,7 +44,7 @@ inline fun <TScope, T, reified E : Applier<*>> ComposeDomNode( |
|
|
|
currentComposer.endNode() |
|
|
|
currentComposer.endNode() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
class DisposableEffectHolder<TElement: Element>( |
|
|
|
class DisposableEffectHolder<TElement : Element>( |
|
|
|
var effect: (DisposableEffectScope.(TElement) -> DisposableEffectResult)? = null |
|
|
|
var effect: (DisposableEffectScope.(TElement) -> DisposableEffectResult)? = null |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
@ -135,6 +90,7 @@ fun <TElement : Element> TagElement( |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Composable |
|
|
|
@Composable |
|
|
|
|
|
|
|
@ExperimentalComposeWebApi |
|
|
|
fun <TElement : Element> TagElement( |
|
|
|
fun <TElement : Element> TagElement( |
|
|
|
tagName: String, |
|
|
|
tagName: String, |
|
|
|
applyAttrs: AttrsBuilder<TElement>.() -> Unit, |
|
|
|
applyAttrs: AttrsBuilder<TElement>.() -> Unit, |
|
|
|