• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
WebView loses script context
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Trouble with property (copy) and retain counts
  • Next by Date: Re: Registering Clients using DO
  • Previous by thread: Re: Trouble with property (copy) and retain counts
  • Next by thread: masking events from Image Well
  • Index(es):
    • Date
    • Thread