Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
3dd30876
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
3dd30876
编写于
7月 22, 2022
作者:
Z
zhou-liting125
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Web documentation rectification
Signed-off-by:
N
zhou-liting125
<
zhouliting5@huawei.com
>
上级
03cf3fe0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
70 addition
and
8 deletion
+70
-8
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md
...ication-dev/reference/arkui-ts/ts-basic-components-web.md
+70
-8
未找到文件。
zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md
浏览文件 @
3dd30876
...
...
@@ -83,6 +83,7 @@ onRenderExited接口返回的渲染进程退出的具体原因。
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -115,6 +116,7 @@ domStorageAccess(domStorageAccess: boolean)
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -140,6 +142,7 @@ fileAccess(fileAccess: boolean)
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -165,6 +168,7 @@ fileFromUrlAccess(fileFromUrlAccess: boolean)
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -190,6 +194,7 @@ imageAccess(imageAccess: boolean)
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -218,6 +223,7 @@ javaScriptProxy(javaScriptProxy: { object: object, name: string, methodList: Arr
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -259,6 +265,7 @@ javaScriptAccess(javaScriptAccess: boolean)
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -284,6 +291,7 @@ mixedMode(mixedMode: MixedMode)
-
示例代码
```
js
@
Entry
@
Component
@
State
mode
:
MixedMode
=
MixedMode
.
All
;
struct
WebComponent
{
...
...
@@ -311,6 +319,7 @@ onlineImageAccess(onlineImageAccess: boolean)
## onlineImageAccess
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -336,6 +345,7 @@ zoomAccess(zoomAccess: boolean)
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -361,6 +371,7 @@ overviewModeAccess(overviewModeAccess: boolean)
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -385,6 +396,7 @@ databaseAccess(databaseAccess: boolean)
| databaseAccess | boolean | 是 | - | 设置是否开启数据库存储API权限。 |
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -410,6 +422,7 @@ cacheMode(cacheMode: CacheMode)
-
示例代码
```
js
@
Entry
@
Component
@
State
mode
:
CacheMode
=
CacheMode
.
None
;
struct
WebComponent
{
...
...
@@ -436,6 +449,7 @@ textZoomAtio(textZoomAtio: number)
-
示例代码
```
js
@
Entry
@
Component
@
State
atio
:
Number
=
100
;
struct
WebComponent
{
...
...
@@ -462,6 +476,7 @@ userAgent(userAgent: string)
-
示例代码
```
js
@
Entry
@
Component
@
State
userAgent
:
String
=
'
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36
'
;
struct
WebComponent
{
...
...
@@ -503,6 +518,7 @@ onAlert(callback: (event?: { url: string; message: string; result: JsResult }) =
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -550,6 +566,7 @@ onBeforeUnload(callback: (event?: { url: string; message: string; result: JsResu
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -586,6 +603,7 @@ onConfirm(callback: (event?: { url: string; message: string; result: JsResult })
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -633,6 +651,7 @@ onPrompt(callback: (event?: { url: string; message: string; value: string; resul
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -668,6 +687,7 @@ onConsole(callback: (event?: { message: ConsoleMessage }) => boolean)
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -699,6 +719,7 @@ onDownloadStart(callback: (event?: { url: string, userAgent: string, contentDisp
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -730,6 +751,7 @@ onErrorReceive(callback: (event?: { request: WebResourceRequest, error: WebResou
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -768,6 +790,7 @@ onHttpErrorReceive(callback: (event?: { request: WebResourceRequest, response: W
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -813,6 +836,7 @@ onPageBegin(callback: (event?: { url: string }) => void)
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -840,6 +864,7 @@ onPageEnd(callback: (event?: { url: string }) => void)
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -866,6 +891,7 @@ onProgressChange(callback: (event?: { newProgress: number }) => void)
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -892,6 +918,7 @@ onTitleReceive(callback: (event?: { title: string }) => void)
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -919,6 +946,7 @@ onRefreshAccessedHistory(callback: (event?: { url: string, isRefreshed: boolean
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -945,6 +973,7 @@ onRenderExited(callback: (event?: { renderExitReason: RenderExitReason }) => voi
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -972,6 +1001,7 @@ onShowFileSelector(callback: (event?: { result: FileSelectorResult, fileSelector
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -1020,6 +1050,7 @@ onUrlLoadIntercept(callback: (event?: { data:string | WebResourceRequest }) => b
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -1052,6 +1083,7 @@ onInterceptRequest9+(callback: (event?: { request: WebResourceRequest}) => WebRe
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -1103,12 +1135,14 @@ onHttpAuthRequest(callback: (event?: { handler: HttpAuthHandler, host: string, r
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
httpAuth
:
boolean
=
false
;
build
()
{
Column
()
{
Web
({
src
:
'
www.baidu.com
'
,
controller
:
this
.
controller
})
Web
({
src
:
'
http://httpbin.org/basic-auth/2222/2222
'
,
controller
:
this
.
controller
})
.
onHttpAuthRequest
((
event
)
=>
{
AlertDialog
.
show
({
title
:
'
title
'
,
...
...
@@ -1116,20 +1150,20 @@ onHttpAuthRequest(callback: (event?: { handler: HttpAuthHandler, host: string, r
confirm
:
{
value
:
'
onConfirm
'
,
action
:
()
=>
{
this
.
httpAuth
=
handler
.
isHttpAuthInfoSaved
();
this
.
httpAuth
=
event
.
handler
.
isHttpAuthInfoSaved
();
if
(
this
.
httpAuth
==
false
)
{
web
.
WebDataBase
.
saveHttpAuthCredentials
(
host
,
realm
,
"
2222
"
,
"
2222
"
event
.
host
,
event
.
realm
,
"
2222
"
,
"
2222
"
)
handler
.
confirm
(
"
111
"
,
"
2222
"
);
event
.
handler
.
cancel
(
);
}
}
},
cancel
:
()
=>
{
handler
.
cancel
();
event
.
handler
.
cancel
();
}
})
return
true
;
...
...
@@ -1572,6 +1606,7 @@ accessBackward(): boolean
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -1601,6 +1636,7 @@ accessForward(): boolean
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -1636,6 +1672,7 @@ accessStep(step: number): boolean
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -1660,6 +1697,7 @@ backward(): void
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -1682,6 +1720,7 @@ forward(): void
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -1709,6 +1748,7 @@ backOrForward(step: number): void
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -1737,6 +1777,7 @@ deleteJavaScriptRegister(name: string)
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -1765,6 +1806,7 @@ getHitTest(): HitTestType
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -1792,6 +1834,7 @@ getHitTestValue(): HitTestValue
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -1820,6 +1863,7 @@ getWebId(): number
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -1846,6 +1890,7 @@ getTitle(): string
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -1872,6 +1917,7 @@ getPageHeight(): number
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -1899,6 +1945,7 @@ getDefaultUserAgent(): string
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -1936,6 +1983,7 @@ baseUrl为空时,通过”data“协议加载指定的一段字符串。
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -1973,6 +2021,7 @@ loadUrl(options: { url: string | Resource, headers?: Array\<Header\> })
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -1995,6 +2044,7 @@ onActive(): void
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -2017,6 +2067,7 @@ onInactive(): void
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -2043,6 +2094,7 @@ zoom(factor: number): void
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -2069,6 +2121,7 @@ zoomIn(): boolean
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -2095,6 +2148,7 @@ zoomOut(): boolean
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -2118,6 +2172,7 @@ refresh()
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -2148,6 +2203,7 @@ registerJavaScriptProxy(options: { object: object, name: string, methodList: Arr
-
示例代码
```
js
@
Entry
@
Component
struct
Index
{
controller
:
WebController
=
new
WebController
()
...
...
@@ -2219,6 +2275,7 @@ runJavaScript(options: { script: string, callback?: (result: string) => void })
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -2267,6 +2324,7 @@ stop()
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -2289,6 +2347,7 @@ clearHistory(): void
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -2315,6 +2374,7 @@ getCookieManager(): WebCookie
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -2372,6 +2432,7 @@ setCookie(url: string, value: string): boolean
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
@@ -2398,6 +2459,7 @@ saveCookieSync(): boolean
-
示例代码
```
js
@
Entry
@
Component
struct
WebComponent
{
controller
:
WebController
=
new
WebController
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录