[Webkit-unassigned] [Bug 18048] New: The "thisObject" parameter to JSEvaluateScript is not used properly
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Mar 24 14:14:06 PDT 2008
http://bugs.webkit.org/show_bug.cgi?id=18048
Summary: The "thisObject" parameter to JSEvaluateScript is not
used properly
Product: WebKit
Version: 525.x (Safari 3.1)
Platform: Macintosh
OS/Version: Mac OS X 10.5
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: easco at mac.com
I created some code that tried to use JSEvaluateScript to pass a script to an
object. My expectation was that the script would be evaluated in the context
of the object passed into the "thisObject" parameter, but I found that the
script is always evaluated in the global context.
For example, I tried to do something like
JSObjectRef myDocumentObject = GetObjectRefForDocument(<some document here>);
JSEvaluateScript(jsContext, myScript, myDocumentObject, ... other args ...);
I wanted to pass the script:
this.addDocumentElement()
but that came up with a type error. I had to use:
this.documents[0].addDocumentElement()
Which says to me that the script was evaluated in my global context, and not
the context of my document object.
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list