On Wednesday 06 April 2005 00:06, Allan Sandfeld Jensen wrote: > On Sunday 03 April 2005 20:36, you wrote: > > On Sunday 03 April 2005 18:24, Allan Sandfeld Jensen wrote: > > > CVS commit by carewolf: > > > > > > Implement frame.contentWindow and window.frameElement. > > > > Cool. contentWindow looks fine, but are you sure about frameElement? > > return retrieve(m_frame->m_part) returns a Window object, not an HTML > > element. Isn't that what frameElement should return? (I didn't look > > it up though). > > Okay, what bothers me is this line > return Window::retrieve(frame); > in > FrameArray::get() > > Isn't that also supposed to return a frame? A frame, yes - a frame's Window object :) But not a frame element, no. When JS authors write "window.frames.myframe", they want a "window" object of "myframe", i.e. something with the KJS::Window methods, like document. > And if frames() doesn't contain a list of frames, but a list of windows, how > am I supposed to get a list of frames? Don't get confused by what we Qt/GUI people call "a window". KJS::Window is NOT a "toplevel widget", it's "the global object for a KHTMLPart, with all the main properties for it, like e.g. document etc.". There are really two worlds: - the element in the frameset. which usually we don't care much about :) - the actual frame, i.e. the entire HTML page of the frame, which is a complete KHTMLPart with its JS interpreter, its KJS::Window object etc. To find the frame element in the frameset... I'm not sure how this is best done. I was hoping we were storing it somewhere already, but now I see that Koos' d->m_frame is just the ChildFrame object... That's still all at the frame level, not the " element in the frameset". I guess you'd need to add that storage somehow. Or double check how we currently go from the to the KHTMLPart for it, to see if we can go back that route (sorry, no time to look into this myself today). -- David Faure, faure@kde.org, sponsored by Trolltech to work on KDE, Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).