generated from JetBrains/compose-multiplatform-template
-
Notifications
You must be signed in to change notification settings - Fork 105
Open
Description
hi. thanks a lot for such amazing work of yours and all contributors.
i have HTML content which is coming from the server as string
value. i want to load it inside the webview. it contains some scripts on top. basically something like this:
<html>
<head>
<script src="https://example.com/external.js"></script>
<img src="https://example.com/image.png" />
</head>
<body>
<h1>Test Content</h1>
<script>
console.log('Page loaded, trying to load external resource...');
// Force a request that should trigger the interceptor
var img = new Image();
img.src = 'https://httpbin.org/get?test=interceptor';
img.onload = function() { console.log('External image loaded'); };
img.onerror = function() { console.log('External image failed'); };
</script>
</body>
</html>
Main Issue (android)
RequestInterceptor
does not gets called (not at all, tested for lots of content, searched throughout the examples)- it tries to load the html and remains in loading state until network timeout. then ignores the script and loads the html only.
- tested with other methods, interceptor works fine.
- as suggested in the docs (README):
Developers can load HTML data in the following way...
but in the WebViewState.kt
file on the method doc says:
@param data The uri to load in the WebView
this seems to be a mistake or i am missing something?
thanks
SaeedZhiany
Metadata
Metadata
Assignees
Labels
No labels