Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zh-cn]: create translation of HTMLIFrameElement properties #19688

Merged
merged 11 commits into from
May 4, 2024
Prev Previous commit
Next Next commit
Apply suggestions from code review
  • Loading branch information
T34-active committed Apr 24, 2024
commit f80c9ddd25830c2712515510465393d2c94faae1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ l10n:

{{APIRef("HTML DOM")}}{{SeeCompatTable}}{{non-standard_header}}

> **警告:** 此功能目前遭到两家浏览器厂商反对。有关反对详情,请参阅下面的[标准立场](#标准立场)部分。
> **警告:** 此功能目前遭到两家浏览器厂商反对。有关反对详情,请参阅下面的[标准立场](zh-CN/docs/Web/API/Topics_API#标准立场)部分。
T34-active marked this conversation as resolved.
Show resolved Hide resolved

{{domxref("HTMLIFrameElement")}} 接口的 **`browsingTopics`** 属性是一个布尔值,指定当前用户选择的主题应与之关联的 {{htmlelement("iframe")}} 源请求一起以 {{httpheader("Sec-Browsing-Topics")}} 标头发送。这反映了 `browsingtopics` HTML 属性。
T34-active marked this conversation as resolved.
Show resolved Hide resolved

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ l10n:

访问 `contentWindow` 返回的 {{domxref("Window")}} 须遵守[同源策略](/zh-CN/docs/Web/Security/Same-origin_policy)所定义的规则,这意味着如果与 iframe 父级同源,则父级可以访问 iframe 的文档以及内部 DOM,如果它们跨源,则对窗口属性的访问受到严格限制。有关详细信息,请参阅[跨源脚本 API 访问](/zh-CN/docs/Web/Security/Same-origin_policy#cross-origin_script_api_access)。
T34-active marked this conversation as resolved.
Show resolved Hide resolved
T34-active marked this conversation as resolved.
Show resolved Hide resolved

通过与消息事件的 {{domxref("MessageEvent.source", "source")}} 属性进行比较,还可以使用该属性找出是哪个 iframe 页面发送了消息
通过与消息事件的 {{domxref("MessageEvent.source", "source")}} 属性进行比较,还可以使用该属性找出是哪个 iframe 页面发送了 {{domxref("Window.postMessage()")}}

## 示例

Expand Down