aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiaJiaJiang <luojia@luojia.me>2021-09-20 17:40:37 +0800
committerIrvin <irvinfly@gmail.com>2021-09-28 22:35:26 +0800
commit42cd8a24a23972f4c378308328503fa2854c7fd0 (patch)
tree95e210e3f88543e631e1ec3e66d3e5ec8127b5f6
parent8949c9132987437a305dfafbf24520a58e884797 (diff)
downloadtranslated-content-42cd8a24a23972f4c378308328503fa2854c7fd0.tar.gz
translated-content-42cd8a24a23972f4c378308328503fa2854c7fd0.tar.bz2
translated-content-42cd8a24a23972f4c378308328503fa2854c7fd0.zip
create zh-CN translation for Web/API/Location/ancestorOrigins
-rw-r--r--files/zh-cn/web/api/location/ancestororigins/index.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/location/ancestororigins/index.md b/files/zh-cn/web/api/location/ancestororigins/index.md
new file mode 100644
index 0000000000..244b64c41c
--- /dev/null
+++ b/files/zh-cn/web/api/location/ancestororigins/index.md
@@ -0,0 +1,29 @@
+---
+title: 'Location: ancestorOrigins'
+slug: Web/API/Location/ancestorOrigins
+tags:
+ - API
+ - Location
+ - Property
+ - Reference
+browser-compat: api.Location.ancestorOrigins
+---
+{{APIRef("Location")}}
+
+{{domxref("Location")}}接口的 **`ancestorOrigins`** 只读属性是一个静态的{{domxref("DOMStringList")}},倒序排列了此{{domxref("Location")}}对象所属文档先前所有浏览上下文的来源。
+
+你可以在脚本中使用`location.ancestorOrigins`来检测你的网页是否被你不希望的对象嵌入了。你也可以使用它让网页在被特定站点嵌入时做出不同的表现。
+
+## 语法
+
+```js
+const ancestors = location.ancestorOrigins;
+```
+
+## 规范
+
+{{Specifications}}
+
+## 浏览器兼容性
+
+{{Compat}}