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
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.
const ancestors = location.ancestorOrigins;
|HTML Living Standard
The definition of 'ancestorOrigins ' in that specification.
BCD tables only load in the browser