File tree 1 file changed +12
-12
lines changed
1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,12 @@ function withAndroidInterface(callback: (_: SnowplowWebInterface) => void) {
30
30
}
31
31
}
32
32
33
+ function withAndroidInterfaceV2 ( callback : ( _ : SnowplowWebInterfaceV2 ) => void ) {
34
+ if ( window . SnowplowWebInterfaceV2 ) {
35
+ callback ( window . SnowplowWebInterfaceV2 ) ;
36
+ }
37
+ }
38
+
33
39
function withIOSInterface ( callback : ( _ : WebkitMessageHandler ) => void ) {
34
40
if (
35
41
window . webkit &&
@@ -40,18 +46,6 @@ function withIOSInterface(callback: (_: WebkitMessageHandler) => void) {
40
46
}
41
47
}
42
48
43
- function withReactNativeInterface ( callback : ( _ : ReactNativeInterface ) => void ) {
44
- if ( window . ReactNativeWebView ) {
45
- callback ( window . ReactNativeWebView ) ;
46
- }
47
- }
48
-
49
- function withAndroidInterfaceV2 ( callback : ( _ : SnowplowWebInterfaceV2 ) => void ) {
50
- if ( window . SnowplowWebInterfaceV2 ) {
51
- callback ( window . SnowplowWebInterfaceV2 ) ;
52
- }
53
- }
54
-
55
49
function withIOSInterfaceV2 ( callback : ( _ : WebkitMessageHandlerV2 ) => void ) {
56
50
if (
57
51
window . webkit &&
@@ -62,6 +56,12 @@ function withIOSInterfaceV2(callback: (_: WebkitMessageHandlerV2) => void) {
62
56
}
63
57
}
64
58
59
+ function withReactNativeInterface ( callback : ( _ : ReactNativeInterface ) => void ) {
60
+ if ( window . ReactNativeWebView ) {
61
+ callback ( window . ReactNativeWebView ) ;
62
+ }
63
+ }
64
+
65
65
function serializeContext ( context ?: Array < SelfDescribingJson > | null ) {
66
66
if ( context ) {
67
67
return JSON . stringify ( context ) ;
You can’t perform that action at this time.
0 commit comments