From 42cd8a24a23972f4c378308328503fa2854c7fd0 Mon Sep 17 00:00:00 2001 From: JiaJiaJiang Date: Mon, 20 Sep 2021 17:40:37 +0800 Subject: create zh-CN translation for Web/API/Location/ancestorOrigins --- .../web/api/location/ancestororigins/index.md | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 files/zh-cn/web/api/location/ancestororigins/index.md (limited to 'files/zh-cn/web') 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}} -- cgit v1.2.3-54-g00ecf