On Jun 30, 2005, at 2:56 AM, Gary Yuen wrote:
Is it possible to call a JavaScript function from the currently
loaded page? After it's loaded, can call a function and pass it a
value?
Yes.
And the right place to ask this is on the perhaps-misleadingly
named email@hidden mailing list. This is an
obsolete list for talking about development of WebCore; that
discussion is now part of the WebKit Open Source Project (see our
website at <http://webkit.opendarwin.org>).
There are two easy ways to do this. One is to call:
-[WebView windowScriptObject]
on an existing WebView. This gives you an object of type
WebScriptObject, and you can get properties, call methods, etc.
There's also an older API:
-[WebView stringByEvaluatingJavaScriptFromString:]
which takes a string.
-- Darin