78 | | |
79 | | === JavaScript === |
80 | | |
81 | | QtWebKit for Qt 5 uses V8 as the underlying JS engine. The implementation of QObject bindings needed for WebKit1 as well as potentially for WebKit2's |
82 | | WebProcess should be implemented in either in the QtScript library (based on V8) or another library in Qt that provides equivalent functionality. |
83 | | |
84 | | ---- |
85 | | Jocelyn: This is long term stuff, but since we want to have the main interface as QML from a different process than the page's JS runtime, I think we should take the time to re-evaluate the benefits of exposing the engine using the QtScript API. This was a dream we had before WebKit2 was introduced. |
86 | | Chrome's extention are allowed to manipulate pages content using [http://code.google.com/chrome/extensions/content_scripts.html content scripts] and can communicate with the extension's script using [http://code.google.com/chrome/extensions/messaging.html messages]. Doing the same kind of stuff is one way I see how to prevent the developer from having to tediously load a C++ module in the web process. |
87 | | |
88 | | Simon: I agree, C++ modules are tedious compared to script injection. A direct export-QObject-pointer-to-JS API may not make sense anymore, but for compatibility I think |
89 | | we'll have to continue to offer that in the WebKit1 API library. That could still be done through V8 and QtScript-QObject bindings. |
90 | | |
91 | | === Discussion === |
92 | | noamr: I think that this is a good direction. A big question yet to be answered is how much hybrid support we need going forward with WebKit2. If we enable QML with WebKit2, do we enable the javaScriptWindowObjects property? or do we go with something a bit different like allowing communication with the container via channel messaging? |
93 | | |
94 | | simon: I like the idea of a channel messaging as an API, especially when on the QML side the messages could be received in "onMessageReceived:" alike signal handlers |
95 | | and posted via QML's JavaScript. |
96 | | |
97 | | romaxa: WebGL option a) will require some double buffering -> additional tx->tx copy, also creation +1 GL context on WebProcess side, sounds like serialization is better way to go |