mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
web-view images now will be loaded correctly with base url
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
<Page>
|
<Page>
|
||||||
<StackLayout orientation="vertical">
|
<StackLayout orientation="vertical">
|
||||||
<WebView src="~/web-view/test.html" height="50" />
|
<WebView src="~/web-view/test.html" height="50" />
|
||||||
<WebView src="<html><body><img src='./pages/test2.png'></img></body></html>" height="75" />
|
<WebView src="<html><body><img src='./ui-tests-app/pages/test2.png'></img></body></html>" height="75" />
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</Page>
|
</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,8 +100,8 @@ export class WebView extends common.WebView {
|
|||||||
this._ios.loadRequest(NSURLRequest.requestWithURL(NSURL.URLWithString(src)));
|
this._ios.loadRequest(NSURLRequest.requestWithURL(NSURL.URLWithString(src)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public _loadData(src: string) {
|
public _loadData(content: string) {
|
||||||
this._ios.loadHTMLStringBaseURL(src, null);
|
this._ios.loadHTMLStringBaseURL(content, NSURL.alloc().initWithString(`file:///${fs.knownFolders.currentApp().path}/`));
|
||||||
}
|
}
|
||||||
|
|
||||||
get canGoBack(): boolean {
|
get canGoBack(): boolean {
|
||||||
|
Reference in New Issue
Block a user