Comments (1)
It's something I've looked into in the past, and I believe the short answer was : nope !
But there's a long answer.
There's already an implementation of WebView in qmlweb (use import QtWebView 1.0
). It uses an iframe to provide a result similar to the native WebView... but some features are unavailable: history, loading html directly into the iframe, managing cookies...
These are things that we just can't do reliably with iframes, mostly because of the default CORS setup, which will prevent you from running JavaScript within an iframe... which you'd definitely need to do stuff like injecting HTML, managing the history, etc.
If you're interested in this topic, the following discussion on stackoverflow will give you all the details you need:
https://stackoverflow.com/questions/251420/invoking-javascript-code-in-an-iframe-from-the-parent-page
Basically, and if memory serves well : assuming you use the WebView to display a page that's hosted on a server that you own, then you could configure it to allow your QMLWeb application to run JavaScript inside the iframe. An implementation of WebView within QMLWeb could work on these conditions.
Here's the current implementation for WebView:
https://github.com/qmlweb/qmlweb/blob/master/src/modules/QtWebView/WebView.js
The same argument can be made for WebEngine... there's probably a whole bunch of stuff in WebEngine that just cannot be done through JavaScript code that would run from within a browser.
Anyhow, if you're interested in trying to provide a better WebView implementation, I can provide some guidance... but I'm a bit too busy at the moment to tackle this right now.
from qmlweb.
Related Issues (20)
- Live reloading implementation HOT 2
- I was not able to run example HOT 9
- Get started is required HOT 2
- `npm run test` fails on windows HOT 5
- singleton definition is not supported by readQmlDir
- Qml for real project (Answer) HOT 1
- Cannot start simplest example, need help. HOT 2
- qml text in rectangle position bug HOT 2
- How to start? HOT 1
- Error: No constructor found for "TapHandler" HOT 3
- ability to import external libraries HOT 4
- Missing support for Gradient
- If the font is loaded after the document has been set up, the width and height of Text are off
- Uglify name mangling breaks qmlweb
- Help using qmlweb with nodejs server HOT 1
- Support of ES6+ HOT 3
- How can I load a project instead of a single qml file๏ผ HOT 1
- Is this project still being maintained? HOT 5
- Several questions about QMLWeb architecture. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qmlweb.