FIX: WebView not showing in gallery app

This commit is contained in:
vakrilov
2017-03-21 15:40:18 +02:00
parent f8b13acce6
commit c72ec09fe0
4 changed files with 8 additions and 36 deletions

View File

@@ -21,15 +21,9 @@ export abstract class WebViewBase extends View implements WebViewDefinition {
"other"
];
public _suspendLoading: boolean;
public src: string;
public _onLoadFinished(url: string, error?: string) {
this._suspendLoading = true;
this._suspendLoading = false;
let args = <LoadEventData>{
eventName: WebViewBase.loadFinishedEvent,
object: this,
@@ -53,8 +47,6 @@ export abstract class WebViewBase extends View implements WebViewDefinition {
this.notify(args);
}
abstract _loadUrl(url: string): void;
abstract _loadFileOrResource(path: string, content: string): void;
abstract _loadHttp(src: string): void;
@@ -81,10 +73,6 @@ export abstract class WebViewBase extends View implements WebViewDefinition {
return "";
}
set [srcProperty.native](src: string) {
if (this._suspendLoading) {
return;
}
this.stopLoading();
if (isFileOrResourcePath(src)) {
@@ -103,6 +91,13 @@ export abstract class WebViewBase extends View implements WebViewDefinition {
this._loadData(src);
}
}
get url() : string {
throw new Error("Property url of WebView is deprecated. Use src istead");
}
set url(value:string){
throw new Error("Property url of WebView is deprecated. Use src istead")
}
}
srcProperty.register(WebViewBase);