focusedFrame

Returns the focused frame on the currently loaded web page, if any.

Make sure that the web page is loaded completely before accessing its focused frame.