Lynx

Attributes

auto-height

Android
iOS
3.8
// @defaultValue: false
'auto-height'?: boolean;

Lets the frame height follow the embedded Lynx page’s content height. When enabled, the embedded page can report its content size, and the frame uses that value as its measured height.

auto-width

Android
iOS
3.8
// @defaultValue: false
'auto-width'?: boolean;

Lets the frame width follow the embedded Lynx page’s content width. When enabled, the embedded page can report its content size, and the frame uses that value as its measured width.

data

Android
iOS
3.4
data?: Record<string, unknown>;

Passes data to the nested Lynx page within the frame.

enable-multi-async-thread

Android
iOS
3.9
// @defaultValue: false
'enable-multi-async-thread'?: boolean;

Overrides whether the embedded Lynx page uses multiple asynchronous threads. When omitted, the frame inherits the host setting.

global-props

Android
iOS
3.6
'global-props'?: Record<string, unknown>;

Passes globalProps to the Lynx page embedded in the frame. The embedded page can read it via lynx.__globalProps .

preset-height

Android
iOS
3.9
'preset-height'?: `${number}px` | `${number}rpx`;

Sets the preset height used before the embedded Lynx page receives an initialized content rect.

preset-width

Android
iOS
3.9
'preset-width'?: `${number}px` | `${number}rpx`;

Sets the preset width used before the embedded Lynx page receives an initialized content rect.

src

Android
iOS
3.4
src: string;

Sets the loading path for the frame resource.

Events

Frontend can bind corresponding event callbacks to listen for runtime behaviors of the element, as shown below.

bindload

Android
iOS
3.6
bindload = (e: FrameLoadEvent) => {};
FieldTypeOptionalDefaultPlatformsSinceDescription
statusCodenumberNo
Android
iOS
3.6
3.6Frame loaded status code.
statusMessagestringNo
Android
iOS
3.6
3.6Frame loaded status message.
urlstringNo
Android
iOS
3.6
3.6The loaded url of the frame.

Bind frame load event callback.

bindloadmetrics

Android
iOS
3.9
bindloadmetrics = (e: FrameLoadMetricsEvent) => {};
FieldTypeOptionalDefaultPlatformsSinceDescription
entryFrameLoadMetricsEntryNo
Android
iOS
3.9
3.9The raw loadBundle performance entry emitted by the embedded Lynx page.
modestringNo
Android
iOS
3.9
3.9The frame loading mode.
urlstringNo
Android
iOS
3.9
3.9The loaded url of the frame.

Bind frame load metrics event callback.

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.