JavaScript inside a webview shouldn't freeze anything. You can subclass QWebPage and reimplement shouldInterruptJavaScript() if you want however this is not exactly what you want.
JavaScript inside a webview shouldn't freeze anything. You can subclass QWebPage and reimplement shouldInterruptJavaScript() if you want however this is not exactly what you want.
brcontainer (17th May 2013)
Those languages run on server side and not on the client. I don't see how this relates to your problem.
You can do anything you want if you implement it. There are several IPC methods available in computer world. If you teach both programs to use them then you can pass information between different programs.Is there any way I can pass variables and commands a QWebView in a program to another QWebView in another program?
brcontainer (17th May 2013)
Thanks again for your quick response.
I had read about IPC, but I'm having trouble reimplement createWindow.
An example of this is that I also tried Qfuture::run", however when passing the QWebpage for createWindow he hangs anyway. I believe I have to reimplement createWindow with Qfuture.
How could I reimplement createWindow (or QWebPage, QWebFrame, etc.) with functions like Thread (To do something like the thread) ?
I have no idea what you are trying to do. Why do you wish to reimplement createWindow()?
Thanks for the help and the quick response.
Every time I click an anchor with target="_blank" (or run the window.open) the QWebPage performing QWebPage::createWindow.I have no idea what you are trying to do. Why do you wish to reimplement createWindow()?
The QWebPage::createWindow need to get the new QWebPage who will receive the target="_blank" (or target="name").
But to send to send a page that can freeze, it also ends up freezing the window PARENT and other windows created by QWebPage::createWindow.
I need to isolate the QWebPage but without affecting the functionality of the targets, window.opener and parent.window.
The only browser I've seen that works this way is the Google Chrome, if one tab has a Javascript that cause freezing, only the tab (or window) freezes, the other tabs work normally (the other tabs and windows do not freeze).
Last edited by brcontainer; 17th May 2013 at 15:42. Reason: improved
Thanks again for the quick response.
both QWebVieW as Qwebpage has createWindow ( http://qt-project.org/doc/qt-4.8/qwe...cted-functions )
Example:
Qt Code:
class myWebPage : public QWebPage { protected: Q_UNUSED(url); return UA; } QWebPage * createWindow(QWebPage::WebWindowType type) { return new QWebPage; } };To copy to clipboard, switch view to plain text mode
I know that, but I just used it as an example for you to understand. I wonder if it has something to do with Qt?
Could you help me with this? Thanks
Last edited by brcontainer; 17th May 2013 at 17:57.
If you state your problem clearly then maybe someone can help. As I said, JavaScript alone will not freeze your browser as it is periodically interrupted so that the browser can process its events. When QtWebKit detects a long running script, it will pop up a window asking whether you want to abort the script or not.
test my app (open-source QT5):
http://www.mediafire.com/download.php?85zm06bvwv9lyow
Note that clicking on anchor test Freeze all application windows freeze.
I need the window open for anchor "test Freeze" freezes and that the other windows continue to work normally (without freezing).
I wonder if you could help me?
Thanks.
Hello @wysota
I appreciate your attempt to help me, but it does have to do with my question.
And I'm not the problem JavaScript engine, I just want to separate the "QWebView" into something like multi-processes (eg. QFuture, QThread, etc.).
I'll try to be more simple and clear in the question:
How to separate the QWebView (or QwebPage, QWebFrame, etc.) into something like multi-processes (eg. QFuture, QThread, etc.)?
Bookmarks