Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can I call JavaScript from webkit?



Hi Darin,

Thank you very much. I found the answer in the documentation. :) I'm just getting started with this stuff so sorry for the basic questions.

For future questions about how to use webkit or DOM, is the webkitsdk- dev list the best place?

Gary

On 2005/7/1, at 上午 7:56, Darin Adler wrote:

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



-----
If we want to create, we have to credit ourselves with much more freedom than previously was given us and thus free ourselves of morality and bring liveliness to our celebrations. (Intimations of the future! To celebrate the future and not the past! To invent the myth of this future! To live in hopefulness!) Blessed moments! But then: let the curtain fall, and let us bring our thinking back to solid goals near at hand! - Nietzsche


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webcore-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webcore-dev/email@hidden

This email sent to email@hidden
References: 
 >can I call JavaScript from webkit? (From: Gary Yuen <email@hidden>)
 >Re: can I call JavaScript from webkit? (From: Darin Adler <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.