Location: ancestorOrigins property
The ancestorOrigins
read-only
property of the Location
interface is a static
DOMStringList
containing, in reverse order, the origins of all ancestor
browsing contexts of the document associated with the given Location
object.
You can use 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.
Value
Specifications
Specification |
---|
HTML # dom-location-ancestororigins-dev |
Browser compatibility
Report problems with this compatibility data on GitHubdesktop | mobile | server | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ancestorOrigins |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.
- User must explicitly enable this feature.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.