mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
WebView NavigationType converted to type
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user