OSX + fuse 0.21.0.6650, running Android and iOS device previews simultaneously.
Testing with the following code:
<App>
<JavaScript>
var Observable = require('FuseJS/Observable');
var url = Observable('about:blank');
function loadPage() {
url.value = 'https://www.fusetools.com/'
};
function pageLoaded(res) {
console.log('page was loaded: ' + JSON.stringify(res));
};
module.exports = {
'loadPage': loadPage,
'pageLoaded': pageLoaded,
'url': url
};
</JavaScript>
<ClientPanel>
<Grid Rows="auto,1*">
<Panel Height="80">
<Panel Width="70%" Height="50" Alignment="Center" HitTestMode="LocalBoundsAndChildren">
<Text Alignment="Center" Value="Load page" FontSize="16" />
<Clicked>
<Callback Handler="{loadPage}" />
</Clicked>
<Rectangle Fill="#abc" CornerRadius="3" />
</Panel>
</Panel>
<NativeViewHost>
<WebView ux:Name="WebView" Url="{url}" Margin="10">
<PageLoaded>
<EvaluateJS Handler="{pageLoaded}">
return { url : document.location.href };
</EvaluateJS>
</PageLoaded>
</WebView>
</NativeViewHost>
</Grid>
</ClientPanel>
</App>
On Android everything works as expected - when clicking the “Load page” button, the page is successfully loaded into the WebView
and I get my {pageLoaded}
handler called and I get the console.log printed to Monitor.
On iOS, however, the page loads successfully, but I never get the {pageLoaded}
handler called and nothing is logged to Monitor.
Since there are oauth2 client-side solutions that rely on being able to parse the URL after getting redirected somewhere, this is pretty much critical as they work on Android but don’t on iOS.