From 6a13a432439908e3e09d1ba6c87657f104db8480 Mon Sep 17 00:00:00 2001 From: laosan_ted Date: Tue, 15 Nov 2022 19:30:49 +0800 Subject: [PATCH] fix docs check Signed-off-by: laosan_ted --- .../reference/apis/js-apis-webview.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-webview.md b/zh-cn/application-dev/reference/apis/js-apis-webview.md index b547ce6a2e..a31ccc4a1e 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-webview.md +++ b/zh-cn/application-dev/reference/apis/js-apis-webview.md @@ -170,7 +170,20 @@ struct WebComponent { ### 创建对象 ```ts -controller: web_webview.WebviewController = new web_webview.WebviewController(); +// xxx.ets +import web_webview from '@ohos.web.webview' + +@Entry +@Component +struct WebComponent { + controller: web_webview.WebviewController = new web_webview.WebviewController(); + + build() { + Column() { + Web({ src: 'www.example.com', controller: this.controller }) + } + } +} ``` ### loadUrl -- GitLab