WebPlatformForEmbedded / WPEWebKit

WPE WebKit port (downstream)
213 stars 136 forks source link

Add env var to allow keeping the existent navigation on a fragment load #1193

Closed pgorszkowski-igalia closed 11 months ago

pgorszkowski-igalia commented 11 months ago

Tested with COG on RPi, the simple testcase was taken from: https://github.com/WebPlatformForEmbedded/WPEWebKit/issues/988: Reproduction with simple html:

  1. cog https://people.igalia.com/pgorszkowski/988.html, where 988.html is:
    <html>
    <head>
    <script>
    let i = 0;
    function changeLocation(){
    i+=1
    window.location.href = "#"+i;
    setTimeout(changeLocation,10)
    }
    changeLocation()
    </script>
    </head>
    <body>
    Navigation test
    </body>
    </html>
  2. Switch url: cogctl -y open "https://google.com/"

Without WPE_KEEP_NAVIGATION_ON_FRAGMENT_LOAD=1 it is not possible to open new site, with WPE_KEEP_NAVIGATION_ON_FRAGMENT_LOAD=1 it can be opened.