chore: expose more from web-view

This commit is contained in:
Nathan Walker
2020-07-18 13:04:47 -07:00
parent bc1f1a14c5
commit 448400a610
9 changed files with 12 additions and 12 deletions

View File

@@ -14,7 +14,7 @@ export const urlProperty: Property<WebView, string>;
/**
* Represents navigation type
*/
export type NavigationType = 'linkClicked' | 'formSubmitted' | 'backForward' | 'reload' | 'formResubmitted' | 'other' | undefined;
export type WebViewNavigationType = 'linkClicked' | 'formSubmitted' | 'backForward' | 'reload' | 'formResubmitted' | 'other' | undefined;
/**
* Represents a standard WebView widget.

View File

@@ -1,4 +1,4 @@
import { NavigationType } from '.';
import { WebViewNavigationType } from '.';
import { WebViewBase } from './web-view-common';
import { profile } from '../../profiling';
import { Trace } from '../../trace';
@@ -18,7 +18,7 @@ class WKNavigationDelegateImpl extends NSObject implements WKNavigationDelegate
public webViewDecidePolicyForNavigationActionDecisionHandler(webView: WKWebView, navigationAction: WKNavigationAction, decisionHandler: any): void {
const owner = this._owner.get();
if (owner && navigationAction.request.URL) {
let navType: NavigationType = 'other';
let navType: WebViewNavigationType = 'other';
switch (navigationAction.navigationType) {
case WKNavigationType.LinkActivated:

View File

@@ -1,4 +1,4 @@
import { LoadEventData, NavigationType } from './web-view-interfaces';
import { LoadEventData, WebViewNavigationType } from './web-view-interfaces';
import { ContainerView, CSSType } from '../core/view';
import { Property } from '../core/properties';
import { EventData } from '../../data/observable';
@@ -27,7 +27,7 @@ export abstract class WebViewBase extends ContainerView {
this.notify(<any>args);
}
public _onLoadStarted(url: string, navigationType: NavigationType) {
public _onLoadStarted(url: string, navigationType: WebViewNavigationType) {
let args = <LoadEventData>{
eventName: WebViewBase.loadStartedEvent,
object: this,

View File

@@ -1,11 +1,11 @@
import { WebView } from '.';
import { EventData } from '../../data/observable';
export type NavigationType = 'linkClicked' | 'formSubmitted' | 'backForward' | 'reload' | 'formResubmitted' | 'other' | undefined;
export type WebViewNavigationType = 'linkClicked' | 'formSubmitted' | 'backForward' | 'reload' | 'formResubmitted' | 'other' | undefined;
export interface LoadEventData extends EventData {
url: string;
navigationType: NavigationType;
navigationType: WebViewNavigationType;
error: string;
}