[Webkit-unassigned] [Bug 29481] New: [Qt] QWebFrame::evaluateJavaScript() always returns null

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 18 08:44:50 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=29481

           Summary: [Qt] QWebFrame::evaluateJavaScript() always returns
                    null
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Other
        OS/Version: Mac OS X 10.5
            Status: NEW
          Keywords: Qt
          Severity: Normal
          Priority: P2
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: vestbo at webkit.org


This bug report originated from issue QTBUG-3019
http://bugreports.qt.nokia.com/browse/QTBUG-3019

--- Description ---

EvaluateJavaScript is supposed to provide the return value of the script. It's
always null. 
http://doc.trolltech.com/4.4/qwebframe.html#evaluateJavaScript


int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    QWebView *view = new QWebView;
    view->setHtml("<html><body>Hello world</body></html>");
    view->show();

    QEventLoop l;
    QTimer::singleShot(2000, &l, SLOT(quit()));
    l.exec();

    qDebug() << "evaluating javascript";

    QVariant retval =
view->page()->mainFrame()->evaluateJavaScript("alert('hi'); return true;");
    qDebug() << retval;

    return app.exec();
}

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list