-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Overview
The goal of the pxBrowser project is to add support for web browser rendering inside of Spark / pxScene apps. This challenge will target just the Windows port to keep scope reasonable. A future challenge will add Mac support.
Spark apps can have multiple IViews. The pxBrowserView will be one pxIView that can be created using the code example provided below. The pxIView will be for the desktop only.
The goal of the sample app was to create a simple app that allowed for isolated development of the pxBrowserView. Once that is working then we would like to integrate pxBrowserView into Spark and launch the browser view using the scene.create() example like this:
var wv = scene.create({
t:'browser',
url: 'https://www.google.com'
});
Links
- QT's web engine: http://doc.qt.io/qt-5/qtwebengine-overview.html#qt-webengine
- We can target the latest QT version for now
Notes
- The attached example (see below) creates a window, a browser view container (pxIViewContainer), and a browser view (pxIView).
- pxBrowserViewContainer has a pxBrowserView reference
- The browser view in the example app simply renders a red rectangle right now, but we are going to fill in the details to render a webpage. See
virtual void RT_STDCALL onDraw() - Please use the skeleton app below to fill in the details of pxBrowserView
- pxBrowserView’s onDraw should render the desired web page
Rendering
The DirectFB code is unofficially deprecated, and the only path we currently need to support is OpenGL. Based on the Qt docs, this should work fine with the latest version of Qt.
Testing
Please provide very clear setup and testing documentation so that reviewers and the client can easily validate your submission.
APIs
Please implement the below APIs for pxBrowserViewContainer and pxBrowserView. These should be accessible as rtProperties and events:
Properties:
url- stringcookieJar- jsonproxies- jsonwebfilter- jsonuserAgent- stringtransparentBackground- boolvisible,getVisible- boollocalStorageEnabled- boolconsoleLogEnabled- boolheaders- object
Events:
onHTMLDocumentLoaded- wheree.success,e.httpStatusare definedonHTMLLinkClicked- wheree.valueis defined and is the URL of the link clickedonConsoleLog- wheree.logMessageis definedstruct onError- wheree.errorType,e.descriptionare definedonCookieJarChangedonLaunchMetrics
Example code
We can use this as the skeleton that we fill in for demonstration.