tools/api/docs/templates/add-lynx-view-client.mdx
{{ api.brief_desc }}
{% if api.android_member %}
{{ api.android_member.prototype }}
{% if api.android_member.params %}
{% for param in api.android_member.params %}
{{ param.name }}: {{ param.brief_desc }}
{% endfor %}
{% endif %}
{% if api.android_member.returns.brief_desc %}:::note
{% for note in api.android_member.note %}
::: {% endif %} {% endif %} {% if api.ios_member %}
{{ api.ios_member.prototype }}
{% if api.ios_member.params %}
{% for param in api.ios_member.params %}
{{ param.name }}: {{ param.brief_desc }}
{% endfor %}
{% endif %}
{% if api.ios_member.returns.brief_desc %}:::note
{% for note in api.ios_member.note %}
::: {% endif %} {% endif %}
LynxView has clients member:
clients: LynxViewClient[]: The structure implemented by the client and registered to the LynxView instance is used to obtain the callbacks of each process in the LynxView lifecycle.On the HarmonyOS platfrom, you need to pass your implemented LynxViewClient as a parameter during the initialization of LynxView:
@Entry
@Component
struct Index {
private clients: EntryLynxClient[] = [new EntryLynxClient()];
build() {
Column() {
LynxView({
clients: this.clients,
}).width('100%').height('100%');
}
.size({ width: '100%', height: '100%' })
}
}
import { LegacyCompatTable } from '@lynx';
<LegacyCompatTable metadata="lynx-native-api/{{ api.parent_name }}/{{ api.kebab_name }}" />