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 30, 2024
commit bb1c3f3efb61c694dfd634d6a5d3d70bdaac286d
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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)。
访问由 `contentWindow` 返回的 {{domxref("Window")}} 受到[同源策略](/zh-CN/docs/Web/Security/Same-origin_policy)规定的规则约束,这意味着,如果与 iframe 父级同源,那么父级页面可以访问 iframe 的文档以及内部 DOM,如果它们跨源,则父页面对窗口属性的访问权限极其有限。有关详细信息,请参阅[跨源脚本 API 访问](/zh-CN/docs/Web/Security/Same-origin_policy#跨源脚本_api_访问)。

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

Expand Down