I happened to look for the same information. Here's what I have found.
https://developer.mozilla.org/en-US/docs/Web/API/Window.frameElement
I have tested some browsers in addition to the MDN doc, and confirmed that it is supported by IE7+, Safari, Firefox, Chrome. So pretty much all browsers.
I haven't tested on IE6-, but I guess you don't need to care.