New tag

Sandeep Sarat sarat at cs.jhu.edu
Wed Dec 19 16:43:55 GMT 2007


Thanks for the reply. I am trying to understand, how the wrapping
is done, while preserving the scope.

To give you a concrete example, say, I have an html file with an iframe in
it and say both the iframe and parent html call alert(document.title).

Reading the source code and using gdb, I see the KJSProxy::evaluate (in
khtml) calls the interpreter KJS::evaluate(in KJS) with the entire script
code as a string. After some processing in KJS, DOMObject::Get (in khtml)
is called, which subsequently calls the HTMLDocument::tryGet, which
returns the appropriate string for title.

I want to figure out at HTMLDocument::tryGet which "context" originated
the request for title.

Sorry, If I am a bit dense with my explanation, I have been looking over
the code only for a couple of days and am still not comfortable with my
way around it. I appreciate your help.

regards,
-Sandeep

On Tue, 18 Dec 2007, Maksim Orlovich wrote:
>
> I would be glad to answer any questions or to offer pointers, but I'd need
> a more specific question to be of much use.
>
> But basically, each DOM object is wrapped by a JS object when needed, and
> it takes some care to keep the wrappers around in case JS properties are
> put in there.





More information about the kfm-devel mailing list