Summary: | [Qt] Add QML/WK2 evaluateJavaScript experimental API | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kenneth Rohde Christiansen <kenneth> | ||||||
Component: | WebKit Qt | Assignee: | Kenneth Rohde Christiansen <kenneth> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | ahf, hausmann, jesus, menard, webkit.review.bot, zalan, zoltan | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Kenneth Rohde Christiansen
2012-05-03 07:14:21 PDT
Created attachment 140007 [details]
Patch
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 { } Created attachment 140701 [details]
Patch
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. Landed in 116420. |