@@ -362,7 +362,7 @@ export class UnsupportedSDKError extends Error {
362
362
}
363
363
364
364
@CSSType ( 'WebView' )
365
- export class WebViewExtBase extends ContainerView {
365
+ export abstract class WebViewExtBase extends ContainerView {
366
366
public webConsole : boolean ;
367
367
368
368
public static readonly supportXLocalScheme : boolean ;
@@ -765,58 +765,42 @@ export class WebViewExtBase extends ContainerView {
765
765
/**
766
766
* Platform specific loadURL-implementation.
767
767
*/
768
- public _loadUrl ( src : string ) : void {
769
- throw new Error ( 'Method not implemented.' ) ;
770
- }
768
+ abstract _loadUrl ( src : string ) : void ;
771
769
772
770
/**
773
771
* Platform specific loadData-implementation.
774
772
*/
775
- public _loadData ( src : string ) : void {
776
- throw new Error ( 'Method not implemented.' ) ;
777
- }
773
+ abstract _loadData ( src : string ) : void ;
778
774
779
775
/**
780
776
* Stops loading the current content (if any).
781
777
*/
782
- public stopLoading ( ) {
783
- throw new Error ( 'Method not implemented.' ) ;
784
- }
778
+ abstract stopLoading ( ) ;
785
779
786
780
/**
787
781
* Gets a value indicating whether the WebView can navigate back.
788
782
*/
789
- public get canGoBack ( ) : boolean {
790
- throw new Error ( 'This member is abstract.' ) ;
791
- }
783
+ abstract get canGoBack ( ) : boolean ;
792
784
793
785
/**
794
786
* Gets a value indicating whether the WebView can navigate forward.
795
787
*/
796
- public get canGoForward ( ) : boolean {
797
- throw new Error ( 'This member is abstract.' ) ;
798
- }
788
+ abstract get canGoForward ( ) : boolean ;
799
789
800
790
/**
801
791
* Navigates back.
802
792
*/
803
- public goBack ( ) {
804
- throw new Error ( 'Method not implemented.' ) ;
805
- }
793
+ abstract goBack ( ) ;
806
794
807
795
/**
808
796
* Navigates forward.
809
797
*/
810
- public goForward ( ) {
811
- throw new Error ( 'Method not implemented.' ) ;
812
- }
798
+ abstract goForward ( ) ;
813
799
814
800
/**
815
801
* Reloads the current url.
816
802
*/
817
- public reload ( ) {
818
- throw new Error ( 'Method not implemented.' ) ;
819
- }
803
+ abstract reload ( ) ;
820
804
821
805
[ srcProperty . getDefault ] ( ) : string {
822
806
return '' ;
@@ -921,24 +905,17 @@ export class WebViewExtBase extends ContainerView {
921
905
* Register a local resource.
922
906
* This resource can be loaded via "x-local://{name}" inside the webview
923
907
*/
924
- public registerLocalResource ( name : string , filepath : string ) : void {
925
- throw new Error ( 'Method not implemented.' ) ;
926
- }
908
+ abstract registerLocalResource ( name : string , filepath : string ) : void ;
927
909
928
910
/**
929
911
* Unregister a local resource.
930
912
*/
931
- public unregisterLocalResource ( name : string ) : void {
932
- throw new Error ( 'Method not implemented.' ) ;
933
- }
913
+ abstract unregisterLocalResource ( name : string ) : void ;
934
914
935
915
/**
936
916
* Resolve a "x-local://{name}" to file-path.
937
917
*/
938
- public getRegisteredLocalResource ( name : string ) : string | void {
939
- throw new Error ( 'Method not implemented.' ) ;
940
- }
941
-
918
+ abstract getRegisteredLocalResource ( name : string ) : string | void ;
942
919
/**
943
920
* Load URL - Wait for promise
944
921
*
@@ -1207,9 +1184,7 @@ export class WebViewExtBase extends ContainerView {
1207
1184
* Larger scripts should be injected with loadJavaScriptFile.
1208
1185
* NOTE: stringifyResult only applies on iOS.
1209
1186
*/
1210
- public executeJavaScript < T > ( scriptCode : string , stringifyResult ?: boolean ) : Promise < T > {
1211
- throw new Error ( 'Method not implemented.' ) ;
1212
- }
1187
+ abstract executeJavaScript < T > ( scriptCode : string , stringifyResult ?: boolean ) : Promise < T > ;
1213
1188
1214
1189
/**
1215
1190
* Execute a promise inside the webview and wait for it to resolve.
@@ -1459,21 +1434,13 @@ export class WebViewExtBase extends ContainerView {
1459
1434
* Get document.title
1460
1435
* NOTE: On Android, if empty returns filename
1461
1436
*/
1462
- public getTitle ( ) : Promise < string | void > {
1463
- throw new Error ( 'Method not implemented.' ) ;
1464
- }
1437
+ abstract getTitle ( ) : Promise < string | void > ;
1465
1438
1466
- public zoomIn ( ) : boolean {
1467
- throw new Error ( 'Method not implemented.' ) ;
1468
- }
1439
+ abstract zoomIn ( ) : boolean ;
1469
1440
1470
- public zoomOut ( ) : boolean {
1471
- throw new Error ( 'Method not implemented.' ) ;
1472
- }
1441
+ abstract zoomOut ( ) : boolean ;
1473
1442
1474
- public zoomBy ( zoomFactor : number ) {
1475
- throw new Error ( 'Method not implemented.' ) ;
1476
- }
1443
+ abstract zoomBy ( zoomFactor : number ) ;
1477
1444
1478
1445
/**
1479
1446
* Helper function, strips 'x-local://' from a resource name
0 commit comments