Skip to content
Tauri 中文网

Webview 版本

🌐 WebView2 (Windows)

Tauri 使用基于 Microsoft Edge 的 WebView2,因此也基于 Chromium。WebView2 可以自行更新,你可以保证在所有 Windows 目标上都能使用相对较新的 Chromium 构建版本。

🌐 Tauri uses WebView2 which is based on Microsoft Edge and therefore Chromium. WebView2 can update itself, you are guaranteed a relatively recent chromium build on all Windows targets.

WebView2 支持 Windows 7 及更新版本,并预装在 Windows 11 上。在早于 Windows 11 的版本上,Tauri 生成的安装程序会负责确保系统中已安装 WebView2。

🌐 WebView2 is supported on Windows 7 and newer and comes preinstalled on Windows 11. On versions older than Windows 11 the installer generated by Tauri takes care of ensuring WebView2 is installed on the system.

🌐 WebKit (macOS, iOS, & Linux)

Tauri 在 macOS 上使用 WebKit(通过 WKWebView)和在 Linux 上使用 WebKit(通过 webkit2gtk)。

🌐 Tauri uses WebKit on macOS (through WKWebView) and Linux (through webkit2gtk).

🌐 Interpreting WebKit Version Numbers

Webkit 版本号相当复杂,因此以下是一些有助于理解它们的信息。

🌐 Webkit version numbers are quite complicated, so below is some helpful information to understand them.

WebKit 版本号由 5 个段和一个数字前缀组成,表示 WebKit 是为哪个操作系统构建的:

🌐 WebKit version numbers are made up of 5 segments and a numeric prefix indicating which OS WebKit is built for:

$(SYSTEM_VERSION_PREFIX)$(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION).$(MICRO_VERSION).$(NANO_VERSION)

数字前缀称为 SYSTEM_VERSION_PREFIX,似乎只出现在 macOS 和 iOS 构建中(Linux 上没有)。此外,如果最后两个部分都是 0,它们可以省略(所以像 613.2.7.0.0 这样的版本会被称为 `613.2.7“)。

🌐 The numeric prefix is called the SYSTEM_VERSION_PREFIX and seems to be only present for macOS and iOS builds (not for Linux). Furthermore, if the last two segments are both 0 they can be omitted (so a version like 613.2.7.0.0 would be referred to as 613.2.7).

例如,随 macOS Monterey (12.x) 上的 Safari 15.5 一起发布的 WebKit 版本号为 17613.2.7.1.8。你可以这样理解它:

🌐 As an example, the WebKit version shipped with Safari 15.5 on macOS Monterey (12.x) has the version number 17613.2.7.1.8. You can interpret it like this:

  • SYSTEM_VERSION_PREFIX:17
  • MAJOR_VERSION:613
  • MINOR_VERSION:2
  • TINY_VERSION:7
  • MICRO_VERSION:1
  • NANO_VERSION:8

以下是 SYSTEM_VERSION_PREFIX 值对应的内容:

🌐 Here is what the SYSTEM_VERSION_PREFIX values map to:

macOS 版本SYSTEM_VERSION_PREFIX
sdk=iphone*8
14.019
13.018
12.017
11.016
10.1515
10.1414
10.1313
10.1212
10.1111

在 macOS 上,Tauri 使用自 macOS 10.10(Yosemite)版本起预安装的 webview。它被认为是核心组件,因此会随常规操作系统更新而更新。这意味着不受支持的 macOS 版本不会收到 WebKit 更新。

🌐 On macOS, Tauri uses the webview that comes preinstalled with macOS since version 10.10 (Yosemite). It is considered a core component and is therefore updated with the regular OS updates. This means unsupported macOS versions do not receive WebKit updates.

要在你的 macOS 版本上查找 WKWebView 使用的 WebKit 版本,你可以在终端中使用以下命令:

🌐 To find the WebKit version used by WKWebView on your version of macOS you can use this command in the terminal:

Terminal window
awk '/CFBundleVersion/{getline;gsub(/<[^>]*>/,"");print}' /System/Library/Frameworks/WebKit.framework/Resources/Info.plist

🌐 WebKit Versions in Safari

下表将操作系统版本映射到相应的 WebKit Safari 版本,以便你可以使用像 caniuse 这样的网站来确定特定的网页平台功能是否受支持。

🌐 The table below maps an OS version to the corresponding WebKit Safari versions so that you can use sites like caniuse to figure out if a specific web platform feature is supported.

操作系统名称操作系统版本WebKit 版本Safari 版本备注
索诺玛14.0(测试版)616.1.14.11.1117.0已在 2023 M2 14 英寸 MacBook Pro 上验证
Ventura13.4.1615.2.9.11.716.5.1已在 2023 年 M2 14 英寸 MacBook Pro 上验证
13.3.1615.1.26.11.23在 2023 年款 M2 14 英寸 MacBook Pro 上验证
13.3615.1.26.11.2216.4在 2023 年 M2 14 英寸 MacBook Pro 上验证
13.2.1614.4.6.1.6
13.2?16.3
13.1614.3.7.1.516.2已在 2020 年 M1 13 英寸 MacBook Pro 上验证
13.0.1已在 2020 年 M1 13 英寸 MacBook Pro 上验证
13.0614.2.9.1.1216.1已在 2020 年 M1 13 英寸 MacBook Pro 上验证
蒙特雷12.6在 2020 年 M1 13 英寸 MacBook Pro 上验证
12.5.1613.3.9.1.1615.6.1已在 2020 M1 13 英寸 MacBook Pro 上验证
12.5613.3.9.1.515.6在 2020 年 M1 13 英寸 MacBook Pro 上验证
12.4613.2.7.1.815.5在2020年M1 13英寸MacBook Pro上验证
12.3.1613.1.17.1.13
12.3613.1.17.1.615.4
12.2.1612.4.9.1.8
12.2612.4.9.1.515.3
12.1.1
12.1612.3.6.1.615.2
12.0.1612.2.9.1.2015.1
12.0612.1.29.41.415.0
大苏尔11.6.7
11.6.6
11.6.5
11.6.2
11.6.1
11.6
11.5.2611.3.10.1.6
11.5.1
11.5611.3.10.1.314.1.2
11.4611.2.7.1.414.1.1
11.3.1
11.3611.1.21.161.314.124” M1 iMac 收到了一个特殊的 WebKit 版本 611.1.21.1.12
11.2.3610.4.3.1.7
11.2.2
11.2.1
11.2610.4.3.1.414.0.3
11.1610.3.7.1.914.0.2
11.0.1610.2.11.51.8
11.0610.2.11.1.314.0.1Safari 14.0 仅在 iPhone 上可用
Catalina10.15.7 安全更新 2022-004609.4.1.1.1
10.15.7609.4.113.1.3
10.15.6609.3.5.1.313.1.2
10.15.5609.2.9.1.213.1.1
10.15.4609.1.20.111.813.1
10.15.3608.5.1113.0.5
10.15.2608.4.9.1.313.0.4
10.15.1608.3.10.1.413.0.3已在 2014 年 15 英寸 MacBook Pro 上验证
10.15608.2.30.1.113.0.2
Mojave10.14.6608.1.4913.0
10.14.4607.1.40.1.512.1
10.14.3606.4.512.0.3
10.14.2606.3.412.0.2
10.14.1606.2.104.1.112.0.1
10.14606.2.1112.0
高雪山10.13.6605.3.811.1.2
10.13.5605.2.811.1.1
10.13.4 安全更新 2018-001605.1.33.1.411.1
10.13.4605.1.33.1.211.1
10.13.3604.5.611.0.3
10.13.2 补充更新604.4.7.1.611.0.227” iMac Pro 收到了一个特殊的 WebKit 版本 604.4.7.10.6
10.13.2604.4.7.1.311.0.227” iMac Pro 收到一个特殊的 WebKit 版本 604.4.7.10.4
10.13.1604.3.511.0.1
10.13604.1.38.1.611.0

Linux 生态系统的多样性意味着很难整理出关于各个发行版上 WebKitGTK 的准确信息。下表是最常用的发行版及其 WebKit 版本的一个非常不完整的列表。你应始终检查你所使用的发行版的仓库以获取最新信息。

🌐 The diverse nature of the Linux ecosystem means it is very hard to compile accurate information about WebKitGTK on the various distros. The table below is a very incomplete list of the most commonly used distributions and their WebKit versions. You should always check your distro’s repositories for up-to-date information.

发行版webkitgtk 版本WebKit 版本Safari 等效版
Debian 11(已更新)、Ubuntu 20.04(已更新)、Ubuntu 22.042.36614.1.6TP 140 (16.0)
Debian 10(已更新)2.34613.1.115.4
Debian 11、Ubuntu 18.04(已更新)、CentOS 8(非流式)2.32612.1.615.0
Ubuntu 20.042.28610.1.114.0
Debian 9(带回溯包)、Debian 102.24608.1.613.0
Ubuntu 18.042.20606.1.412.0

Tauri 中文网 - 粤ICP备13048890号
Nodejs.cn 旗下网站