WebView NavigationType converted to type

This commit is contained in:
vakrilov
2017-04-04 17:31:56 +03:00
parent 59e34f0bfc
commit d427c9ed8f
5 changed files with 18 additions and 45 deletions

View File

@@ -1,9 +1,9 @@
import { WebView as WebViewDefinition, LoadEventData } from ".";
import { WebView as WebViewDefinition, LoadEventData, NavigationType } from ".";
import { View, Property } from "../core/view";
import { isFileOrResourcePath } from "../../utils/utils";
import { File, knownFolders, path } from "../../file-system";
export { File, knownFolders, path };
export { File, knownFolders, path, NavigationType };
export * from "../core/view";
export const srcProperty = new Property<WebViewBase, string>({ name: "src" });
@@ -12,15 +12,6 @@ export abstract class WebViewBase extends View implements WebViewDefinition {
public static loadStartedEvent = "loadStarted";
public static loadFinishedEvent = "loadFinished";
public static navigationTypes = [
"linkClicked",
"formSubmitted",
"backForward",
"reload",
"formResubmitted",
"other"
];
public src: string;
public _onLoadFinished(url: string, error?: string) {
@@ -35,7 +26,7 @@ export abstract class WebViewBase extends View implements WebViewDefinition {
this.notify(args);
}
public _onLoadStarted(url: string, navigationType: string) {
public _onLoadStarted(url: string, navigationType: NavigationType) {
let args = <LoadEventData>{
eventName: WebViewBase.loadStartedEvent,
object: this,