From cd6c541c31bd16f4067049412c80c4ac557f3e52 Mon Sep 17 00:00:00 2001 From: coollixin Date: Mon, 24 Jul 2023 17:30:48 +0800 Subject: [PATCH] =?UTF-8?q?worker=20=E5=BA=8F=E5=88=97=E5=8C=96=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E7=B1=BB=E6=96=87=E6=A1=A3=E8=A1=A5=E5=85=85=20issue:?= =?UTF-8?q?https://gitee.com/openharmony/docs/issues/I7NJMU?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: coollixin --- .../reference/apis/js-apis-worker.md | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-worker.md b/zh-cn/application-dev/reference/apis/js-apis-worker.md index 64c8b9a39f..2ae6e87673 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-worker.md +++ b/zh-cn/application-dev/reference/apis/js-apis-worker.md @@ -2025,18 +2025,8 @@ parentPort.onerror = function(e){ ## 其他说明 ### 序列化支持类型 -| Type | 备注 | 是否支持 | -| ------------------ | -------------------------------------- | -------- | -| All Primitive Type | 不包括symbol | 是 | -| Date | | 是 | -| String | | 是 | -| RegExp | | 是 | -| Array | | 是 | -| Map | | 是 | -| Set | | 是 | -| Object | 只支持Plain Object,不支持带function的 | 是 | -| ArrayBuffer | 提供transfer能力 | 是 | -| TypedArray | | 是 | + +序列化支持类型包括:除Symbol之外的基础类型、Date、String、RegExp、Array、Map、Set、Object(仅限简单对象,比如通过"{}"或者"new Object"创建,普通对象仅支持传递属性,不支持传递其原型及方法)、ArrayBuffer、TypedArray。 特例:传递通过自定义class创建出来的object时,不会发生序列化错误,但是自定义class的属性(如Function)无法通过序列化传递。 > **说明:**
-- GitLab