• Web APIs
  • caches
  • credentialless Experimental
  • devicePixelRatio
  • documentPictureInPicture Experimental
  • event Deprecated
  • external Deprecated
  • fence Experimental
  • fullScreen Non-standard
  • innerWidth
  • launchQueue Experimental
  • locationbar
  • mozInnerScreenX Non-standard
  • mozInnerScreenY Non-standard
  • navigation Experimental
  • orientation Deprecated
  • originAgentCluster Experimental
  • performance
  • screenLeft
  • scrollbars
  • scrollMaxX Non-standard
  • scrollMaxY Non-standard
  • sessionStorage
  • sharedStorage Experimental
  • status Deprecated
  • trustedTypes
  • atob()
  • back() Non-standard Deprecated
  • blur() Deprecated
  • captureEvents() Deprecated
  • clearImmediate() Non-standard Deprecated
  • confirm()
  • dump() Non-standard
  • find() Non-standard
  • forward() Non-standard Deprecated
  • getDefaultComputedStyle() Non-standard
  • getScreenDetails() Experimental
  • moveTo()
  • prompt()
  • queryLocalFonts() Experimental
  • releaseEvents() Deprecated
  • requestFileSystem() Non-standard Deprecated
  • scroll()
  • scrollByLines() Non-standard
  • scrollByPages() Non-standard
  • setImmediate() Non-standard Deprecated
  • setResizable() Non-standard Deprecated
  • showDirectoryPicker() Experimental
  • showModalDialog() Non-standard Deprecated
  • showOpenFilePicker() Experimental
  • showSaveFilePicker() Experimental
  • sizeToContent() Non-standard
  • webkitConvertPointFromNodeToPage() Non-standard Deprecated
  • webkitConvertPointFromPageToNode() Non-standard Deprecated
  • Events
    1. beforeprint
    2. cut
    3. error
    4. hashchange
    5. messageerror
    6. orientationchange Deprecated
    7. pageswap
    8. resize
    9. scrollsnapchange Experimental
    10. scrollsnapchanging Experimental
    11. unload Deprecated
    12. vrdisplayactivate Non-standard Deprecated
    13. vrdisplayconnect Non-standard Deprecated
    14. vrdisplaydeactivate Non-standard Deprecated
    15. vrdisplaydisconnect Non-standard Deprecated
    16. vrdisplaypresentchange Non-standard Deprecated
  • Inheritance
    1. Learn more
    2. See full compatibility
  • The Window.frameElement property returns the element (such as <object>) in which the window is embedded.

    Note: Despite this property's name, it works for documents embedded within any embedding point, including <object>, <embed>.

    Value

    The element which the window is embedded into. If the window isn't embedded into another document, or if the document into which it's embedded has a different null instead.

    Examples

    js
    const frameEl = window.frameElement;
    / If we're embedded, change the containing element's URL to 'https://mozilla.org/'
    if (frameEl) {
      frameEl.src = "https://mozilla.org/";
    }
    

    Specifications

    Specification
    HTML
    # dom-frameelement-dev

    Browser compatibility

    BCD tables only load in the browser

    See also

    • window.frames returns an array-like object, listing the direct sub-frames of the current window.
    • window.parent returns the parent window, which is the window containing the frameElement of the child window.