Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
Description
Relative urls are useful on the web since there is always an url base (the html document) which the url can be resolved against. Qt on the web should support relative urls, too.
Use cases to consider include
- QNetworkAccessManager
- Qt Quick XmlHttpRequest
- Qt Quick Image ("image.src=image.jpg")
Note that the rules for resolving urls can be surprising: it's the html document that is the base, not the js (or .wasm) file:
/app/index.html /app/app.js /app/component/component.js
Calls to fetch(“image.jpg”) from either index.html, app.js, or component.js will all fetch “/app/image.jpg”.