Skip to content

Commit

Permalink
QtWebKit: add WebView stub
Browse files Browse the repository at this point in the history
Currently falls back to QtWebView impl.
  • Loading branch information
ChALkeR committed Feb 10, 2018
1 parent 8def323 commit ebb7f19
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions src/modules/QtWebKit/WebView.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
QmlWeb.registerQmlType({
module: "QtWebKit",
name: "WebView",
versions: /^3\./,
baseClass: "QtWebView.WebView", // It"s easier this way
enums: {
ErrorDomain: {
NoErrorDomain: 0, InternalErrorDomain: 1, NetworkErrorDomain: 2,
HttpErrorDomain: 3, DownloadErrorDomain: 4
},
LoadStatus: {
LoadStartedStatus: 1, LoadSucceededStatus: 2, LoadFailedStatus: 3
},
NavigationRequestAction: { AcceptRequest: 0, IgnoreRequest: 255 },
NavigationType: {
LinkClickedNavigation: 0, FormSubmittedNavigation: 1,
BackForwardNavigation: 2, ReloadNavigation: 3,
FormResubmittedNavigation: 4, OtherNavigation: 5
}
},
properties: {
icon: "url"
},
signals: {
navigationRequested: [
{ type: "var", name: "request" }
],
linkHovered: [
{ type: "url", name: "hoveredUrl" },
{ type: "string", name: "hoveredTitle" }
]
}
}, class {
constructor(meta) {
QmlWeb.callSuper(this, meta);

// TODO: implement more features on top of WebView
}
});

0 comments on commit ebb7f19

Please sign in to comment.