From 9a110dee28ae2ef12ee014b98fda6bae6ee48edb Mon Sep 17 00:00:00 2001 From: YujiSoftware Date: Wed, 2 Mar 2022 20:22:51 +0900 Subject: Migrate to Compat macro (zh-cn) --- files/zh-cn/web/api/blob/slice/index.html | 62 +------------------------------ 1 file changed, 1 insertion(+), 61 deletions(-) (limited to 'files/zh-cn/web/api/blob/slice') diff --git a/files/zh-cn/web/api/blob/slice/index.html b/files/zh-cn/web/api/blob/slice/index.html index 7b0dff2d4d..c0d7ccfa9b 100644 --- a/files/zh-cn/web/api/blob/slice/index.html +++ b/files/zh-cn/web/api/blob/slice/index.html @@ -47,67 +47,7 @@ translation_of: Web/API/Blob/slice

浏览器兼容

-

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
功能ChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
基本支持10 {{property_prefix("webkit")}}‡
- 21
5 {{ property_prefix("moz") }}‡
- 13
10125.1 (534.29) {{ property_prefix("webkit") }}
-
- -
- - - - - - - - - - - - - - - - - - - -
功能AndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
基本支持{{ CompatUnknown() }}{{ CompatGeckoMobile("13.0") }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
-
- -

实现 slice() 的一些声明

- -

slice() 方法第二个参数的默认值将会传入原始 Blob 的长度。 如果你在调用的时候传入的 start + length 超出了原始 Blob 的长度,那么返回的 Blob  对象将会包含从 start 到原始数据的末尾。

- -

那个版本的 slice() 在 Firefox 4 WebKit 和 Opera 11.10 中实现了。但是它的语法和 Array.slice() 以及 String.slice() 有所出入,所以 Gecko 和 Webkit 移除掉了它的支持并且加上了新语法的支持  {{ manch("mozSlice") }}/Blob.webkitSlice

- -

从 Gecko 13.0 {{ geckoRelease("13.0") }} 和 Chrome 21 开始, {{ manch("slice") }} 就再也没有浏览器前缀了。

- -

Gecko notes

- -

在先前的 Gecko 12.0 {{ geckoRelease("12.0") }}, 有一个 bug 会影响到 {{ manch("slice") }} 的行为; 他在 start 和 end 位置组成的范围超出 signed 64-bit 值的范围的时候不工作; 这个问题已经被解决,现在支持传入 unsigned 64-bit 值.

+{{Compat("api.Blob.slice")}}

参见

-- cgit v1.2.3-54-g00ecf