From 86a615423170618c9643a1b765f817043cf7a93c Mon Sep 17 00:00:00 2001 From: Vladimir Enchev Date: Thu, 29 Oct 2015 11:30:29 +0200 Subject: [PATCH] web-view images now will be loaded correctly with base url --- apps/ui-tests-app/web-view/wvlocal.xml | 2 +- ui/web-view/web-view.ios.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/ui-tests-app/web-view/wvlocal.xml b/apps/ui-tests-app/web-view/wvlocal.xml index 81e59b05b..c0a187d35 100644 --- a/apps/ui-tests-app/web-view/wvlocal.xml +++ b/apps/ui-tests-app/web-view/wvlocal.xml @@ -1,6 +1,6 @@ - + diff --git a/ui/web-view/web-view.ios.ts b/ui/web-view/web-view.ios.ts index 205107953..932a4eaaf 100644 --- a/ui/web-view/web-view.ios.ts +++ b/ui/web-view/web-view.ios.ts @@ -1,5 +1,6 @@ import common = require("./web-view-common"); import trace = require("trace"); +import fs = require("file-system"); global.moduleMerge(common, exports); @@ -99,8 +100,8 @@ export class WebView extends common.WebView { this._ios.loadRequest(NSURLRequest.requestWithURL(NSURL.URLWithString(src))); } - public _loadData(src: string) { - this._ios.loadHTMLStringBaseURL(src, null); + public _loadData(content: string) { + this._ios.loadHTMLStringBaseURL(content, NSURL.alloc().initWithString(`file:///${fs.knownFolders.currentApp().path}/`)); } get canGoBack(): boolean {