FireMonkey WebBrowser1.LoadFromStrings and JS in separate files does not work


For Android.
I added JS files in Deploy Manager.
After installing the application on my phone, I checked. Files exist and are where they should be.
I am creating programmatically html like this:
<!DOCTYPE html>
<html lang="en">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="js\my.min.js" referrerpolicy="origin"></script>

So, if I load document in such way: WebBrowser1.LoadFromStrings(…..); JS Does not work.
But if I save this HTML to disk and try this: WebBrowser1.Navigate(‘file://’+TPath.Combine(FPath,’1.html’)); All work fine.
My question is: how to correctly specify the JS-file path in HTML, if I want use WebBrowser1.LoadFromStrings() ?
I need the same for iOS too.

Comments are closed.