How good is JavaFX WebView in JavaScript?

853 views
Skip to first unread message

Fabrizio Giudici

unread,
Jun 29, 2013, 4:56:15 AM6/29/13
to java...@googlegroups.com
So far I've been using WebView - other than pure HTML rendering - e.g. in
embedding some JavaScript-based legacy application inside a rich desktop
application, and it worked fine. It only needed some patches to the
JavaScript code (that was some old one, not perfectly portable, written
for Firefox). Yesterday I started the integration with the Aloha Editor to
have a WYSIWYG HTML editor embedded in a rich destop application, and some
surprise came: the editor correctly boots, I can type and delete
characters, but e.g. selecting a sequence of characters and applying a
bold style eats up some parts.

I supposed that JavaScript support in WebView is exactly the original one
in WebKit. Am I wrong? Do you have any experience to share?

Thanks.

--
Fabrizio Giudici - Java Architect @ Tidalwave s.a.s.
"We make Java work. Everywhere."
http://tidalwave.it/fabrizio/blog - fabrizio...@tidalwave.it

Sven Reimers

unread,
Jun 29, 2013, 5:24:58 AM6/29/13
to java...@googlegroups.com

You should ask this on the openjfx mailinglist... or check the jira for openjfx

My guess is it should work as you expect.

Sven

--
You received this message because you are subscribed to the Google Groups "Java Posse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to javaposse+unsubscribe@googlegroups.com.
To post to this group, send email to java...@googlegroups.com.
Visit this group at http://groups.google.com/group/javaposse.
For more options, visit https://groups.google.com/groups/opt_out.


Fabrizio Giudici

unread,
Jul 1, 2013, 9:08:25 AM7/1/13
to java...@googlegroups.com, Sven Reimers
On Sat, 29 Jun 2013 11:24:58 +0200, Sven Reimers <sven.r...@gmail.com>
wrote:

> You should ask this on the openjfx mailinglist... or check the jira for
> openjfx

Done, but no feedback as here... is it possible that I am the only one
trying this approach?

Alejandro Pedraza

unread,
Jul 28, 2013, 1:03:16 PM7/28/13
to java...@googlegroups.com, Sven Reimers
This is something I'd also be very interested in. Using javafx's great packaging abilities just to wrap web apps to easily deploy in multiple environments. But I've been too afraid of the capabilities of the webview to dive in.

Fabrizio Giudici

unread,
Jul 28, 2013, 2:05:16 PM7/28/13
to java...@googlegroups.com, Alejandro Pedraza, Sven Reimers
On Sun, 28 Jul 2013 19:03:16 +0200, Alejandro Pedraza
<alejandr...@gmail.com> wrote:

> This is something I'd also be very interested in. Using javafx's great
> packaging abilities just to wrap web apps to easily deploy in multiple
> environments. But I've been too afraid of the capabilities of the webview
> to dive in.

As I previously wrote, the current version in JDK 7 is not good for
production in some cases: for instance the Aloha editor doesn't work well,
trying with some Google fonts, the quality of the rendering is poor. I've
tried the latest JDK 8 built: the quality of the rendering is much
improved, but there are still the bugs with the editor. This makes an app
I'm writing pratically unusable, unless you use a workaround, that is
launch an external native browser app for the HTML editing. This of course
defeats the purpose of the app, but I think it's a matter of a few months
and I hope the bugs are fixed. So, I'd say that if you need the WebView,
careful prototype what you need and then draw the conclusion.

Taylan Emre

unread,
Aug 23, 2013, 3:24:31 AM8/23/13
to java...@googlegroups.com
why did not nobody  tried tinycme or ckeditor with javafx?

i tried but:
it crashes with the same issue
https://javafx-jira.kenai.com/browse/RT-23456

i get execution protection violation and appl totally crashes.
to generate the case, on tinymce, clicking right and then left mouse button on the editor kills the appl.
on ck, i crashes often but couldnt generate the scenario, it seems random.

#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000005efc26a0, pid=4536, tid=4228
#
# JRE version: 7.0_21-b11
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.21-b01 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [glass.dll+0x126a0] Java_com_sun_glass_events_KeyEvent__1getKeyCodeForChar+0x1630
#



29 Haziran 2013 Cumartesi 11:56:15 UTC+3 tarihinde fabrizio.giudici yazdı:

Fabrizio Giudici

unread,
Aug 24, 2013, 4:36:59 AM8/24/13
to java...@googlegroups.com, Taylan Emre
On Fri, 23 Aug 2013 09:24:31 +0200, Taylan Emre <tay...@gmail.com> wrote:

> why did not nobody tried tinycme or ckeditor with javafx?
>
> i tried but:
> it crashes with the same issue
> https://javafx-jira.kenai.com/browse/RT-23456
>
> i get execution protection violation and appl totally crashes.
> to generate the case, on tinymce, clicking right and then left mouse
> button
> on the editor kills the appl.
> on ck, i crashes often but couldnt generate the scenario, it seems
> random.

I tried Aduna - it was slightly better than your attempt since it didn't
crash, but there were issues and the editor doesn't work (it corrupts the
text and unproperly renders it). JDK 1.8.0.ea-b99 only resolved the
rendering, while the editor was still broken.

Two weeks ago, though, the issue has been marked as verified and fixed
with the latest JDK 8 - I didn't have the time to check it yet since I'm
on holidays with a limited bandwidth and I can't afford large downloads.
I'll try it in September.

See this issue and the related stuff for more information:

https://javafx-jira.kenai.com/browse/RT-31382


OTOH, editor aparts, I have the experience of a customer with Javascript
legacy code that is successfully executed in a JDK 7 WebView. This is
simpler JavaScript that just reads data from a server and modifies the DOM
in the page.

Fabrizio Giudici

unread,
Aug 31, 2013, 4:24:24 PM8/31/13
to java...@googlegroups.com, Taylan Emre
On Sat, 24 Aug 2013 10:36:59 +0200, Fabrizio Giudici
<Fabrizio...@tidalwave.it> wrote:


> Two weeks ago, though, the issue has been marked as verified and fixed
> with the latest JDK 8 - I didn't have the time to check it yet since I'm
> on holidays with a limited bandwidth and I can't afford large downloads.
> I'll try it in September.

FYI Back at home, I downloaded 8u104 and tried on Mac OS X. Unfortunately
the problems are still here.
Reply all
Reply to author
Forward
0 new messages