* Copyright (c) 2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/-->
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1, user-scalable=no'>
<title>Fit-Content</title>
</head>
<body>
<div>
<div><h2 id='使用场景'>使用场景</h2>
<p>ArkWeb(方舟Web)提供了Web组件,用于在应用程序中显示Web页面内容。常见使用场景包括:</p>
<ul>
<li><p>
应用集成Web页面:应用可以在页面中使用Web组件,嵌入Web页面内容,以降低开发成本,提升开发、运营效率。</p>
</li>
<li><p>
浏览器网页浏览场景:浏览器类应用可以使用Web组件,打开三方网页,使用无痕模式浏览Web页面,设置广告拦截等。</p>
</li>
<li><p>小程序:小程序类宿主应用可以使用Web组件,渲染小程序的页面。</p></li>
</ul>
</div>
<div><h2 id='能力范围'>能力范围</h2>
<p>Web组件为开发者提供了丰富的控制Web页面能力。包括:</p>
<ul>
<li><p>Web页面加载:声明式加载Web页面和离屏加载Web页面等。</p></li>
<li><p>生命周期管理:组件生命周期状态变化,通知Web页面的加载状态变化等。</p></li>
<li><p>常用属性与事件:UserAgent管理、Cookie与存储管理、字体与深色模式管理、权限管理等。</p>
</li>
<li><p>
与应用界面交互:自定义文本选择菜单、上下文菜单、文件上传界面等与应用界面交互能力。</p>
</li>
<li><p>App通过JavaScriptProxy,与Web页面进行JavaScript交互。</p></li>
<li><p>安全与隐私:无痕浏览模式、广告拦截、坚盾守护模式等。</p></li>
<li><p>维测能力:DevTools工具调试能力,使用crashpad收集Web组件崩溃信息。
</p></li>
<li><p>
其他高阶能力:与原生组件同层渲染、Web组件的网络托管、Web组件的媒体播放托管、Web组件输入框拉起自定义输入法、等。</p>
</li>
</ul>
</div>
<div><h2 id='约束与限制'>约束与限制</h2>
<ul>
<li>Web内核版本:ArkWeb基于谷歌Chromium内核开发,使用的Chromium版本为M114。</li>
</ul>
</div>
</div>
</body>
</html>