openharmony 鸿蒙 hiappevent-watcher-web-fling-jank-events

2026-08-25 浏览 (1)

ArkWeb Fling Jank Event Overview

Introduction

ArkWeb provides Web components for displaying web page content in applications, enabling you to control web pages. Page scrolling consists of two phases: dragging and flinging. Dragging refers to the scrolling when you touch the screen. Flinging refers to the page scrolling at a certain speed after your finger leaves the screen. Since API version 23, the ArkWeb fling jank events can be subscribed to. If a user scrolls the web page on an application and frame loss occurs and lasts for more than 50 ms, the ArkWeb fling jank event is triggered and related frame loss data is generated.

This topic describes the ArkWeb fling jank event detection principles, fields, and specifications. For details about how to use the HiAppEvent APIs to subscribe to ArkWeb fling jank events, see the following documents:

NOTE

ArkWeb fling jank events provide only the web_id of the Web component where frame freeze occurs, the maximum frame loss duration, and other related data. You can use web_id to obtain the URL of the web page where frame loss occurs by referring to the sample code in "Subscribing to ArkWeb Fling Jank Events (ArkTS)". Then, use DevTools to reproduce the problem and locate the root cause.

Since API version 23, ArkWeb fling jank events can be subscribed to using HiAppEvent in application clones, atomic services, and input method applications.

Detection Principles

After the rendering and drawing are complete, ArkWeb generates a buffer and sends it to the graphics buffer. The graphics side obtains the buffer and displays it. During the flinging phase, the time difference between the two buffer exchanges between ArkWeb and the graphics side is checked to determine whether a timeout occurs and whether frame loss occurs on the ArkWeb side.

params

The following table describes the params property of the ArkWeb fling jank events.

NameTypeDescription
start_timenumberStart time of the fling effect, which is a timestamp.
durationnumberDuration of the fling effect, in ms.
web_idnumberWeb ID of the component where frame loss occurs.
max_app_frame_timenumberMaximum duration of consecutive frame loss during the fling effect, in ms.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 hiappevent-watcher-app-killed-events

openharmony 鸿蒙 hiappevent-intro

openharmony 鸿蒙 hicollie-guidelines-ndk

openharmony 鸿蒙 event-subscription-overview

openharmony 鸿蒙 hiappevent-watcher-mainthreadjank-events-arkts

openharmony 鸿蒙 hiappevent-watcher-resourceleak-events-ndk

openharmony 鸿蒙 hilog-guidelines-arkts

openharmony 鸿蒙 hiappevent-watcher-apphicollie-events-ndk

openharmony 鸿蒙 hitracechain-guidelines-arkts

openharmony 鸿蒙 hiappevent-watcher-freeze-events

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/uQuSZ5na