未验证 提交 6ea8cdf6 编写于 作者: O openharmony_ci 提交者: Gitee

!1639 fix the web component example.

Merge pull request !1639 from lixingchi1/web_0224
......@@ -114,9 +114,9 @@ struct WebComponent {
controller: WebController = new WebController();
build() {
Column() {
Web(src: $rawfile('index.html'), controller: this.controller)
.javaScriptAccess(javaScriptAccess)
.fileAccess(fileAccess)
Web({ src: $rawfile('index.html'), controller: this.controller })
.javaScriptAccess(this.javaScriptAccess)
.fileAccess(this.fileAccess)
.onPageEnd(e => {
// test() 在 index.html 中已定义
this.controller.runJavaScript('test()');
......@@ -125,8 +125,9 @@ struct WebComponent {
}
}
}
// index.html
```
```
<!-- index.html -->
<!DOCTYPE html>
<html>
<meta charset="utf-8">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册