You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iOS does not download the HTML for remote URLs. This was discussed a few times in the past, but always decided to not be done internally, as the HTML can change at any time, so the developer should decide when to fetch it.
The Android version fetches it on the fly for you too. As shown above it just runs document.documentElement.outerHTML inside the webview.
So for parity it would be nice if it would do the same on iOS instead of returning NULL and you have to run evalJS with the same code. It would just be very convenient if the getter runs it for you (if it is null).
I would actually not want this to happen on iOS (and actually also not on Android) as it adds additional memory overhead and computing resources for a functionality that nearly no one uses (fetching remote html when setting an url). The evalJS API has been made exactly for that use case, so if developers need to access the current rendered HTML, thats the way to go. Thats also how it's handled natively.
But: If this is an issue that affects many developers and causes a lot of struggle, we can expose it. I just don't see that urge right now, but am open for dicussions.
at the moment it was only one community request so far. So we'll keep it as an open issue for now. I've added the example to the docs: #13932 so people can use that for now
I have searched and made sure there are no existing issues for the issue I am filing
Description
Opening an URL in a WebView and trying to get the HTML code only works on Android:
Expected Behavior
it should load google and then return the HTML code.
Actual behavior
it will return "null"
Workaround
use
that is the code that Android will run:
titanium-sdk/android/modules/ui/src/java/ti/modules/titanium/ui/WebViewProxy.java
Line 176 in 322b78d
Platform
iOS
SDK version you are using
12.2.0
Alloy version you are using
No response
The text was updated successfully, but these errors were encountered: