ancestorOrigins
只读特性在
定位
interface is a static
DOMStringList
containing, in reverse order, the origins of all ancestor browsing contexts of the document associated with the given
定位
对象。
可以使用
location.ancestorOrigins
in the script for a document to determine, for example, whenever the document is being framed by a site which you don’t expect it to be framed by. You can also use it to vary the behavior of the document based on what site or list of sites is framing it.
const ancestors = location.ancestorOrigins;
| 规范 | 状态 | 注释 |
|---|---|---|
|
HTML 实时标准
The definition of 'ancestorOrigins ' in that specification. |
实时标准 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
ancestorOrigins
|
Chrome 20 | Edge 79 | Firefox No | IE No | Opera 15 | Safari 6 | WebView Android 4.4 | Chrome Android 25 | Firefox Android No | Opera Android 14 | Safari iOS 6 | Samsung Internet Android 1.5 |
完整支持
不支持