Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-74289

WebAssembly: Support relative urls

    XMLWordPrintable

Details

    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”.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sorvig Morten Sørvig
            sorvig Morten Sørvig
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Tor Arne Vestbø Tor Arne Vestbø
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes