WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
85496
[Qt] Add QML/WK2 evaluateJavaScript experimental API
https://bugs.webkit.org/show_bug.cgi?id=85496
Summary
[Qt] Add QML/WK2 evaluateJavaScript experimental API
Kenneth Rohde Christiansen
Reported
2012-05-03 07:14:21 PDT
SSIA
Attachments
Patch
(6.40 KB, patch)
2012-05-03 07:17 PDT
,
Kenneth Rohde Christiansen
no flags
Details
Formatted Diff
Diff
Patch
(10.65 KB, patch)
2012-05-08 06:33 PDT
,
Kenneth Rohde Christiansen
hausmann
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Kenneth Rohde Christiansen
Comment 1
2012-05-03 07:17:15 PDT
Created
attachment 140007
[details]
Patch
Kenneth Rohde Christiansen
Comment 2
2012-05-03 07:18:44 PDT
Can be tested like this. Alex said he would make some actual tests. diff --git a/Tools/MiniBrowser/qt/qml/BrowserWindow.qml b/Tools/MiniBrowser/qt/qml/BrowserWindow.qml index 9567e8b..16f5079 100644 --- a/Tools/MiniBrowser/qt/qml/BrowserWindow.qml +++ b/Tools/MiniBrowser/qt/qml/BrowserWindow.qml @@ -100,7 +100,7 @@ Rectangle { onClicked: { if (parent.enabled) { console.log("MiniBrowser: Going backward in session history.") - webView.goBack() + webView.experimental.evaluateJavaScript("document.documentElement.innerHTML") } } } @@ -307,6 +307,7 @@ Rectangle { forceActiveFocus(); } + experimental.onJavaScriptResult: { console.log(resultId + ': ' + result) } experimental.devicePixelRatio: 1.5 experimental.preferredMinimumContentsWidth: 980 experimental.itemSelector: ItemSelector { }
Kenneth Rohde Christiansen
Comment 3
2012-05-08 06:33:30 PDT
Created
attachment 140701
[details]
Patch
Simon Hausmann
Comment 4
2012-05-08 06:47:43 PDT
Comment on
attachment 140701
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=140701&action=review
> Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp:1291 > + closure->method = 0;
This line isn't necessary given that method is a QByteArray that has a constructor.
Kenneth Rohde Christiansen
Comment 5
2012-05-08 07:13:56 PDT
Landed in 116420.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug