mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
WebView html with images fixed
This commit is contained in:
6
apps/ui-tests-app/web-view/webviewhtmlwithimages.xml
Normal file
6
apps/ui-tests-app/web-view/webviewhtmlwithimages.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<Page>
|
||||||
|
<GridLayout>
|
||||||
|
<WebView src="<html><body><img src='./tests/logo.png'></img></body></html>" />
|
||||||
|
</GridLayout>
|
||||||
|
</Page>
|
||||||
|
|
@ -1,5 +1,6 @@
|
|||||||
import common = require("./web-view-common");
|
import common = require("./web-view-common");
|
||||||
import trace = require("trace");
|
import trace = require("trace");
|
||||||
|
import fs = require("file-system");
|
||||||
|
|
||||||
global.moduleMerge(common, exports);
|
global.moduleMerge(common, exports);
|
||||||
|
|
||||||
@ -99,7 +100,8 @@ export class WebView extends common.WebView {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this._android.loadData(src, "text/html; charset=utf-8", "utf-8");
|
var baseUrl = `file:///${fs.knownFolders.currentApp().path}/`;
|
||||||
|
this._android.loadDataWithBaseURL(baseUrl, src, "text/html; charset=utf-8", "utf-8", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
get canGoBack(): boolean {
|
get canGoBack(): boolean {
|
||||||
|
Reference in New Issue
Block a user