Bug 101442 - Support for window.frameElement in DOM
Summary: Support for window.frameElement in DOM
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml ecma (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-13 21:20 UTC by Juan Carlos Estibariz
Modified: 2005-04-07 23:08 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juan Carlos Estibariz 2005-03-13 21:20:10 UTC
Version:            (using KDE KDE 3.4.0)
Installed from:    Compiled From Sources
OS:                Linux

Although it's not a standard, both Mozilla(Gecko) and IE support this property which returns the frame or iframe object that is hosting the window in the parent document.

The documentation for IE can be found here:

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/properties.asp

This property mirrors the property "contentWindow" in frame/iframe requested in the bug 99318.
Comment 1 Maksim Orlovich 2005-03-13 21:24:53 UTC
Any uses in actual webpages?
Comment 2 Juan Carlos Estibariz 2005-03-17 03:42:29 UTC
We use it in a product that our company (Quest Software) is developing, it is very helpful when the scripts should work with multiple frames.
Comment 3 Yan Morin 2005-03-27 00:14:43 UTC
Google use it in Google Suggest
http://www.google.com/webhp?complete=1&hl=en
Comment 4 Allan Sandfeld 2005-04-03 18:24:23 UTC
CVS commit by carewolf: 

Implement frame.contentWindow and window.frameElement.

FEATURE: 99318, 101442

Notes:
   Fixes Google Suggest again. 
   It seems the new GMail also uses them, but this alone appears to fix nothing.


  M +5 -0      ChangeLog   1.415
  M +16 -0     ecma/kjs_html.cpp   1.281
  M +4 -2      ecma/kjs_html.h   1.84
  M +3 -0      ecma/kjs_window.cpp   1.400
  M +1 -1      ecma/kjs_window.h   1.111
Comment 5 Allan Sandfeld 2005-04-07 23:08:42 UTC
CVS commit by carewolf: 

Implement window.frameElement correctly
CCBUG:101442


  M +4 -1      kjs_window.cpp   1.402


--- kdelibs/khtml/ecma/kjs_window.cpp  #1.401:1.402
@@ -574,5 +574,8 @@ Value Window::get(ExecState *exec, const
       return getDOMNode(exec,part->document());
     case FrameElement:
-      return retrieve(m_frame->m_part);
+      if (m_frame->m_frame)
+        return getDOMNode(exec,m_frame->m_frame->element());
+      else
+        return Undefined();
     case Node:
       return getNodeConstructor(exec);