[webkit-help] Javascript problem when running on WebKit+Cairo+Win32

Brent Fulgham bfulgham at gmail.com
Tue May 25 13:21:12 PDT 2010


Hi Rick,

On Tue, May 25, 2010 at 12:13 PM, Rick Xu <rick.zhi.xu at gmail.com> wrote:
> But when I try to open a webpage with javascript using the generated
> browser. I found several problems:

The WinLauncher utility isn't a true web browser; it's just a small
launcher application that wraps WebKit and allows simple testing that
rendering and other functions work properly.  Much of the
functionality you are hoping for is provided by the browser, and is
not implemented in WinLauncher.


> 1. When I right click on a URL address on the webpage and select "Open
> Link in New Window", nothing happened. It should open a new window and
> display the URL.

No logic was included to launch new frames.  This might be controlled
by a preference, but I haven't looked into this as I did not need
separate windows for my program.

> 2. It seems: "  alert("....")  " in javascript is not supported. A
> simple line as " alert("say hi"); "  will not pop up any alert window;

WebKit is executing the alert; it's just that the default
implementation is a no-op. You need to provide a delegate to do
something with the alert message.  This is provided by the
"runJavaScriptAlertPanelWithMessage" delegate method, defined by the
IWebFrameLoadDelegate interface.  Take a look in the "include/WebKit"
folder after a build is complete to see the declarations for this
method.

> 3. The SQLite database support. The line " db =
> openDatabase("NoteTest", "1.0", "HTML5 Database API example", 200000);
> " will get no response;

I have not tried this functionality out.  I know some of the other
HTML5 test cases used to work, but I haven't looked at them recently.

Thanks,

-Brent


More information about the webkit-help mailing list