retainWebContent

Functions summary

WebContent
@Composable
@RequiresFeature(name = "WEB_CONTENT", enforcement = "androidx.web.WebFeature#isFeatureSupported")
retainWebContent(block: WebContent.Builder.() -> Unit)

Creates and retains a WebContent instance across configuration changes and transient compositions, automatically closing it when retired.

Functions

retainWebContent

@Composable
@RequiresFeature(name = "WEB_CONTENT", enforcement = "androidx.web.WebFeature#isFeatureSupported")
fun retainWebContent(block: WebContent.Builder.() -> Unit = {}): WebContent

Creates and retains a WebContent instance across configuration changes and transient compositions, automatically closing it when retired.

Parameters
block: WebContent.Builder.() -> Unit = {}

configuration block applied to WebContent.Builder when creating the WebContent

Returns
WebContent

a retained WebContent instance