Skip to content

Commit ebb7f19

Browse files
committed
QtWebKit: add WebView stub
Currently falls back to QtWebView impl.
1 parent 8def323 commit ebb7f19

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

src/modules/QtWebKit/WebView.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
QmlWeb.registerQmlType({
2+
module: "QtWebKit",
3+
name: "WebView",
4+
versions: /^3\./,
5+
baseClass: "QtWebView.WebView", // It"s easier this way
6+
enums: {
7+
ErrorDomain: {
8+
NoErrorDomain: 0, InternalErrorDomain: 1, NetworkErrorDomain: 2,
9+
HttpErrorDomain: 3, DownloadErrorDomain: 4
10+
},
11+
LoadStatus: {
12+
LoadStartedStatus: 1, LoadSucceededStatus: 2, LoadFailedStatus: 3
13+
},
14+
NavigationRequestAction: { AcceptRequest: 0, IgnoreRequest: 255 },
15+
NavigationType: {
16+
LinkClickedNavigation: 0, FormSubmittedNavigation: 1,
17+
BackForwardNavigation: 2, ReloadNavigation: 3,
18+
FormResubmittedNavigation: 4, OtherNavigation: 5
19+
}
20+
},
21+
properties: {
22+
icon: "url"
23+
},
24+
signals: {
25+
navigationRequested: [
26+
{ type: "var", name: "request" }
27+
],
28+
linkHovered: [
29+
{ type: "url", name: "hoveredUrl" },
30+
{ type: "string", name: "hoveredTitle" }
31+
]
32+
}
33+
}, class {
34+
constructor(meta) {
35+
QmlWeb.callSuper(this, meta);
36+
37+
// TODO: implement more features on top of WebView
38+
}
39+
});

0 commit comments

Comments
 (0)