The WebKit binding code is some of the more complex code in JavaFX. Rather than try to extend the script tag you could instead look at the code for the <object> tag and the old support for Netscape-style plugins.
https://github.com/openjdk/jfx/tree/master/modules/javafx.web/src/main/native/Source/WebCore/plugins I've looked at this in the past to investigate embedding of arbitrary JavaFX nodes into a web page. It doesn't look particularly unfeasible as there's still a lot of old code lying around that used to do exactly that, it's just not used much anymore. However wiring it up to the Java level would require a fairly adventurous programmer with good knowledge of C++, rendering engines and JavaFX internals. On Mon, May 11, 2020 at 14:17:07, Rony G. Flatscher <rony.flatsc...@wu.ac.at > wrote: > On 09.05.2020 17:23, Kevin Rushforth wrote: > > WebEngine uses WebKit's JavaScriptCore as its JavaScript engine. The > sources are in the jfx repo, along with the JavaFX-specific classes that > implement the two-way Java <--> JavaScript bridge. Other than the public > API docs for WebEngine, which you referred to in your message, there isn't > any documentation of the interface. > > OK, thank you very much, this is reassuring! :) > > What sort of information are you looking for? > > Well, as event handlers and script tags in HTML have a type attribute that > allows to denote script languages other than JavaScript, I am interested in > evaluating what WebEngine/WebView allows for to support this with any of > the Java script engines. > > ---rony > > On 5/8/2020 7:01 AM, Rony G. Flatscher wrote: > > Wondering which JavaScript engine gets referred to in WebEngine [1]. > > In case it is currently (JavaFX 14) Nashorn [2], what happens after > Nashorn gets removed from the next [3] version? In case it is WebKit's > JavaScriptCore [4] where can one study the interface from WebEngine to it? > > ---rony > > [1] WebEngine: <https://openjfx.io/javadoc/14/javafx.web/javafx/scene/web/ > class-use/WebEngine.html> > [2] Nashorn: <https://openjdk.java.net/projects/nashorn/> > [3] Nashorn removal from JDK 15: <https://openjdk.java.net/jeps/372> > [4] JavaScriptCore: <https://trac.webkit.org/wiki/JavaScriptCore> > >