WebView loses script context
WebView loses script context
- Subject: WebView loses script context
- From: Stefan Lange-Hegermann <email@hidden>
- Date: Tue, 5 May 2009 10:55:14 +0200
Hi!
I have a WebView in which I call JavaScript functions using [[webView
windowScriptObject] callWebScriptMethod:.
When I do it for the first time everything works fine and my script runs
like it should. When I call it from another (objc) function my JS function
can not access the DOM elements using getElementByID though. Using the JS
Console shows me the results, but unlike other JS errors the log is
formatted as plaintext like this:
online.js (line 205)TypeError: Result of expression '$('number_input')'
[null] is not an object.
The second call is invoced through a function triggered by a c-library
callback.
Thank You!
Stefan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden