setUserAgent

abstract suspend fun setUserAgent(userAgent: String? = null, acceptLanguage: String? = null, platform: String? = null)

Sets the user agent for the tab.

This method allows you to override the user agent string, accept language, and platform for the tab's network requests. If no user agent is provided, it will read the existing user agent from the navigator object.

Parameters

userAgent

The user agent string to set. If null, the existing user agent will be used.

acceptLanguage

The accept language string to set. If null, it will not override the existing value.

platform

The platform string to set. If null, it will not override the existing value.