目录

JS Widget Overview

A JS widget is a widget whose pages are developed using the web-like paradigm (HML+CSS+JSON). It now supports both the FA model and the stage model app models. For development guides, see Developing a JS Widget (Stage Model) and Developing a JS Widget (FA Model). When developing a new widget, you are advised to use ArkTS declarative development to build the UI. For differences between the declarative and web-like paradigms, see ArkUI Overview.

How to Implement

Below shows the working principles of a JS widget.

Figure 1 Working principles

The widget host consists of the following modules:

The Widget Manager consists of the following modules:

The widget provider consists of the following modules:

You only need to develop the widget provider. The system automatically handles the work of the widget host and Widget Manager.