From 08a04d85393a0bb5721a17328df62c4915c487c5 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Fri, 5 Feb 2021 18:52:37 +0100 Subject: fix some macros for zh-cn --- files/zh-cn/web/api/request/context/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'files/zh-cn/web/api/request') diff --git a/files/zh-cn/web/api/request/context/index.html b/files/zh-cn/web/api/request/context/index.html index c1ecbc28a0..98730ceb60 100644 --- a/files/zh-cn/web/api/request/context/index.html +++ b/files/zh-cn/web/api/request/context/index.html @@ -5,9 +5,9 @@ translation_of: Web/API/Request/context ---
{{APIRef("Fetch")}}{{deprecated_header()}}
-

The deprecated 弃用context所述的只读属性{{domxref(“请求”)}}接口包含请求的上下文(例如,audioimageiframe)。这定义了要获取的资源类型。它已由{{domxref(“ Request.destination”,“ destination”)}}属性取代。 This defines what sort of resource is being fetched. This has been replaced by the {{domxref("Request.destination", "destination")}} property.

+

The deprecated 弃用context所述的只读属性{{domxref("请求")}}接口包含请求的上下文(例如,audioimageiframe)。这定义了要获取的资源类型。它已由{{domxref("Request.destination”,“ destination")}}属性取代。 This defines what sort of resource is being fetched. This has been replaced by the {{domxref("Request.destination", "destination")}} property.

-

The context of a request is only relevant in the 请求的上下文仅与ServiceWorker API相关服务人员可以根据URL是用于图像还是可嵌入对象(例如{{htmlelement(“视频”)}},{{domxref(“ iframe”)}}等)进行决策。; a service worker can make decisions based on whether the URL is for an image, or an embeddable object such as a {{htmlelement("video")}}, {{domxref("iframe")}}, etc.

+

The context of a request is only relevant in the 请求的上下文仅与ServiceWorker API相关服务人员可以根据URL是用于图像还是可嵌入对象(例如{{htmlelement("视频")}},{{domxref("iframe")}}等)进行决策。; a service worker can make decisions based on whether the URL is for an image, or an embeddable object such as a {{htmlelement("video")}}, {{domxref("iframe")}}, etc.

Note注意:您可以在“ 获取规范请求上下文”部分中找到不同可用上下文的完整列表,包括关联的上下文框架类型,CSP指令和平台功能示例 section.

@@ -19,11 +19,11 @@ translation_of: Web/API/Request/context

Value

-

A {{domxref("RequestContext")}} value.一个{{domxref(“ RequestContext”)}}值。

+

A {{domxref("RequestContext")}} value.一个{{domxref("RequestContext")}}值。

Example例子

-

In the following snippet, we create a new request using the {{domxref("Request.Request()")}} constructor (for an image file in the same directory as the script), then save the request context in a variable:在以下代码段中,我们使用{{domxref(“ Request.Request()”)}}}构造函数创建一个新请求(用于与脚本位于同一目录中的图像文件),然后将请求上下文保存在变量中:

+

In the following snippet, we create a new request using the {{domxref("Request.Request()")}} constructor (for an image file in the same directory as the script), then save the request context in a variable:在以下代码段中,我们使用{{domxref("Request.Request()")}}}构造函数创建一个新请求(用于与脚本位于同一目录中的图像文件),然后将请求上下文保存在变量中:

var myRequest = new Request('flowers.jpg');
 var myContext = myRequest.context; // returns the empty string by default
-- cgit v1.2.3-54-g00ecf