cordova-plugin-inappbrowser-patch 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +37 -0
- package/LICENSE +202 -0
- package/NOTICE +5 -0
- package/README.md +722 -0
- package/RELEASENOTES.md +801 -0
- package/package.json +60 -0
- package/plugin.xml +103 -0
- package/src/android/InAppBrowser.java +1503 -0
- package/src/android/InAppBrowserDialog.java +57 -0
- package/src/android/InAppChromeClient.java +190 -0
- package/src/android/res/drawable-hdpi/ic_action_next_item.png +0 -0
- package/src/android/res/drawable-hdpi/ic_action_previous_item.png +0 -0
- package/src/android/res/drawable-hdpi/ic_action_remove.png +0 -0
- package/src/android/res/drawable-mdpi/ic_action_next_item.png +0 -0
- package/src/android/res/drawable-mdpi/ic_action_previous_item.png +0 -0
- package/src/android/res/drawable-mdpi/ic_action_remove.png +0 -0
- package/src/android/res/drawable-xhdpi/ic_action_next_item.png +0 -0
- package/src/android/res/drawable-xhdpi/ic_action_previous_item.png +0 -0
- package/src/android/res/drawable-xhdpi/ic_action_remove.png +0 -0
- package/src/android/res/drawable-xxhdpi/ic_action_next_item.png +0 -0
- package/src/android/res/drawable-xxhdpi/ic_action_previous_item.png +0 -0
- package/src/android/res/drawable-xxhdpi/ic_action_remove.png +0 -0
- package/src/browser/InAppBrowserProxy.js +245 -0
- package/src/ios/CDVInAppBrowserNavigationController.h +28 -0
- package/src/ios/CDVInAppBrowserNavigationController.m +63 -0
- package/src/ios/CDVInAppBrowserOptions.h +51 -0
- package/src/ios/CDVInAppBrowserOptions.m +90 -0
- package/src/ios/CDVWKInAppBrowser.h +80 -0
- package/src/ios/CDVWKInAppBrowser.m +1223 -0
- package/src/ios/CDVWKInAppBrowserUIDelegate.h +32 -0
- package/src/ios/CDVWKInAppBrowserUIDelegate.m +127 -0
- package/types/index.d.ts +109 -0
- package/www/inappbrowser.js +124 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
or more contributor license agreements. See the NOTICE file
|
|
4
|
+
distributed with this work for additional information
|
|
5
|
+
regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
to you under the Apache License, Version 2.0 (the
|
|
7
|
+
"License"); you may not use this file except in compliance
|
|
8
|
+
with the License. You may obtain a copy of the License at
|
|
9
|
+
|
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
|
|
12
|
+
Unless required by applicable law or agreed to in writing,
|
|
13
|
+
software distributed under the License is distributed on an
|
|
14
|
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
KIND, either express or implied. See the License for the
|
|
16
|
+
specific language governing permissions and limitations
|
|
17
|
+
under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
#import <WebKit/WebKit.h>
|
|
21
|
+
|
|
22
|
+
@interface CDVWKInAppBrowserUIDelegate : NSObject <WKUIDelegate>{
|
|
23
|
+
@private
|
|
24
|
+
UIViewController* _viewController;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@property (nonatomic, copy) NSString* title;
|
|
28
|
+
|
|
29
|
+
- (instancetype)initWithTitle:(NSString*)title;
|
|
30
|
+
-(void) setViewController:(UIViewController*) viewController;
|
|
31
|
+
|
|
32
|
+
@end
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
or more contributor license agreements. See the NOTICE file
|
|
4
|
+
distributed with this work for additional information
|
|
5
|
+
regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
to you under the Apache License, Version 2.0 (the
|
|
7
|
+
"License"); you may not use this file except in compliance
|
|
8
|
+
with the License. You may obtain a copy of the License at
|
|
9
|
+
|
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
|
|
12
|
+
Unless required by applicable law or agreed to in writing,
|
|
13
|
+
software distributed under the License is distributed on an
|
|
14
|
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
KIND, either express or implied. See the License for the
|
|
16
|
+
specific language governing permissions and limitations
|
|
17
|
+
under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
#import "CDVWKInAppBrowserUIDelegate.h"
|
|
21
|
+
|
|
22
|
+
@implementation CDVWKInAppBrowserUIDelegate
|
|
23
|
+
|
|
24
|
+
- (instancetype)initWithTitle:(NSString*)title
|
|
25
|
+
{
|
|
26
|
+
self = [super init];
|
|
27
|
+
if (self) {
|
|
28
|
+
self.title = title;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return self;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
- (void) webView:(WKWebView*)webView runJavaScriptAlertPanelWithMessage:(NSString*)message
|
|
35
|
+
initiatedByFrame:(WKFrameInfo*)frame completionHandler:(void (^)(void))completionHandler
|
|
36
|
+
{
|
|
37
|
+
UIAlertController* alert = [UIAlertController alertControllerWithTitle:self.title
|
|
38
|
+
message:message
|
|
39
|
+
preferredStyle:UIAlertControllerStyleAlert];
|
|
40
|
+
|
|
41
|
+
UIAlertAction* ok = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"OK")
|
|
42
|
+
style:UIAlertActionStyleDefault
|
|
43
|
+
handler:^(UIAlertAction* action)
|
|
44
|
+
{
|
|
45
|
+
completionHandler();
|
|
46
|
+
[alert dismissViewControllerAnimated:YES completion:nil];
|
|
47
|
+
}];
|
|
48
|
+
|
|
49
|
+
[alert addAction:ok];
|
|
50
|
+
|
|
51
|
+
[[self getViewController] presentViewController:alert animated:YES completion:nil];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
- (void) webView:(WKWebView*)webView runJavaScriptConfirmPanelWithMessage:(NSString*)message
|
|
55
|
+
initiatedByFrame:(WKFrameInfo*)frame completionHandler:(void (^)(BOOL result))completionHandler
|
|
56
|
+
{
|
|
57
|
+
UIAlertController* alert = [UIAlertController alertControllerWithTitle:self.title
|
|
58
|
+
message:message
|
|
59
|
+
preferredStyle:UIAlertControllerStyleAlert];
|
|
60
|
+
|
|
61
|
+
UIAlertAction* ok = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"OK")
|
|
62
|
+
style:UIAlertActionStyleDefault
|
|
63
|
+
handler:^(UIAlertAction* action)
|
|
64
|
+
{
|
|
65
|
+
completionHandler(YES);
|
|
66
|
+
[alert dismissViewControllerAnimated:YES completion:nil];
|
|
67
|
+
}];
|
|
68
|
+
|
|
69
|
+
[alert addAction:ok];
|
|
70
|
+
|
|
71
|
+
UIAlertAction* cancel = [UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", @"Cancel")
|
|
72
|
+
style:UIAlertActionStyleDefault
|
|
73
|
+
handler:^(UIAlertAction* action)
|
|
74
|
+
{
|
|
75
|
+
completionHandler(NO);
|
|
76
|
+
[alert dismissViewControllerAnimated:YES completion:nil];
|
|
77
|
+
}];
|
|
78
|
+
[alert addAction:cancel];
|
|
79
|
+
|
|
80
|
+
[[self getViewController] presentViewController:alert animated:YES completion:nil];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
- (void) webView:(WKWebView*)webView runJavaScriptTextInputPanelWithPrompt:(NSString*)prompt
|
|
84
|
+
defaultText:(NSString*)defaultText initiatedByFrame:(WKFrameInfo*)frame
|
|
85
|
+
completionHandler:(void (^)(NSString* result))completionHandler
|
|
86
|
+
{
|
|
87
|
+
UIAlertController* alert = [UIAlertController alertControllerWithTitle:self.title
|
|
88
|
+
message:prompt
|
|
89
|
+
preferredStyle:UIAlertControllerStyleAlert];
|
|
90
|
+
|
|
91
|
+
UIAlertAction* ok = [UIAlertAction actionWithTitle:NSLocalizedString(@"OK", @"OK")
|
|
92
|
+
style:UIAlertActionStyleDefault
|
|
93
|
+
handler:^(UIAlertAction* action)
|
|
94
|
+
{
|
|
95
|
+
completionHandler(((UITextField*)alert.textFields[0]).text);
|
|
96
|
+
[alert dismissViewControllerAnimated:YES completion:nil];
|
|
97
|
+
}];
|
|
98
|
+
|
|
99
|
+
[alert addAction:ok];
|
|
100
|
+
|
|
101
|
+
UIAlertAction* cancel = [UIAlertAction actionWithTitle:NSLocalizedString(@"Cancel", @"Cancel")
|
|
102
|
+
style:UIAlertActionStyleDefault
|
|
103
|
+
handler:^(UIAlertAction* action)
|
|
104
|
+
{
|
|
105
|
+
completionHandler(nil);
|
|
106
|
+
[alert dismissViewControllerAnimated:YES completion:nil];
|
|
107
|
+
}];
|
|
108
|
+
[alert addAction:cancel];
|
|
109
|
+
|
|
110
|
+
[alert addTextFieldWithConfigurationHandler:^(UITextField* textField) {
|
|
111
|
+
textField.text = defaultText;
|
|
112
|
+
}];
|
|
113
|
+
|
|
114
|
+
[[self getViewController] presentViewController:alert animated:YES completion:nil];
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
-(UIViewController*) getViewController
|
|
118
|
+
{
|
|
119
|
+
return _viewController;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
-(void) setViewController:(UIViewController*) viewController
|
|
123
|
+
{
|
|
124
|
+
_viewController = viewController;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@end
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// Type definitions for Apache Cordova InAppBrowser plugin
|
|
2
|
+
// Project: https://github.com/apache/cordova-plugin-inappbrowser
|
|
3
|
+
// Definitions by: Microsoft Open Technologies Inc <http://msopentech.com>
|
|
4
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
|
+
//
|
|
6
|
+
// Copyright (c) Microsoft Open Technologies Inc
|
|
7
|
+
// Licensed under the MIT license.
|
|
8
|
+
// TypeScript Version: 2.3
|
|
9
|
+
type channel = "loadstart" | "loadstop" | "loaderror" | "exit" | "message" | "customscheme";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The object returned from a call to cordova.InAppBrowser.open.
|
|
13
|
+
* NOTE: The InAppBrowser window behaves like a standard web browser, and can't access Cordova APIs.
|
|
14
|
+
*/
|
|
15
|
+
interface InAppBrowser {
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser.
|
|
19
|
+
* @param url The URL to load.
|
|
20
|
+
* @param target The target in which to load the URL, an optional parameter that defaults to _self.
|
|
21
|
+
* @param options Options for the InAppBrowser. Optional, defaulting to: location=yes.
|
|
22
|
+
* The options string must not contain any blank space, and each feature's
|
|
23
|
+
* name/value pairs must be separated by a comma. Feature names are case insensitive.
|
|
24
|
+
*/
|
|
25
|
+
open(url: string, target?: string, options?: string): InAppBrowser;
|
|
26
|
+
|
|
27
|
+
onloadstart(type: Event): void;
|
|
28
|
+
onloadstop(type: InAppBrowserEvent): void;
|
|
29
|
+
onloaderror(type: InAppBrowserEvent): void;
|
|
30
|
+
onexit(type: InAppBrowserEvent): void;
|
|
31
|
+
// addEventListener overloads
|
|
32
|
+
/**
|
|
33
|
+
* Adds a listener for an event from the InAppBrowser.
|
|
34
|
+
* @param type loadstart: event fires when the InAppBrowser starts to load a URL.
|
|
35
|
+
* loadstop: event fires when the InAppBrowser finishes loading a URL.
|
|
36
|
+
* loaderror: event fires when the InAppBrowser encounters an error when loading a URL.
|
|
37
|
+
* exit: event fires when the InAppBrowser window is closed.
|
|
38
|
+
* @param callback the function that executes when the event fires. The function is
|
|
39
|
+
* passed an InAppBrowserEvent object as a parameter.
|
|
40
|
+
*/
|
|
41
|
+
addEventListener(type: channel, callback: InAppBrowserEventListenerOrEventListenerObject): void;
|
|
42
|
+
/**
|
|
43
|
+
* Adds a listener for an event from the InAppBrowser.
|
|
44
|
+
* @param type any custom event that might occur.
|
|
45
|
+
* @param callback the function that executes when the event fires. The function is
|
|
46
|
+
* passed an InAppBrowserEvent object as a parameter.
|
|
47
|
+
*/
|
|
48
|
+
addEventListener(type: string, callback: InAppBrowserEventListenerOrEventListenerObject): void;
|
|
49
|
+
// removeEventListener overloads
|
|
50
|
+
/**
|
|
51
|
+
* Removes a listener for an event from the InAppBrowser.
|
|
52
|
+
* @param type The event to stop listening for.
|
|
53
|
+
* loadstart: event fires when the InAppBrowser starts to load a URL.
|
|
54
|
+
* loadstop: event fires when the InAppBrowser finishes loading a URL.
|
|
55
|
+
* loaderror: event fires when the InAppBrowser encounters an error when loading a URL.
|
|
56
|
+
* exit: event fires when the InAppBrowser window is closed.
|
|
57
|
+
* @param callback the function that executes when the event fires. The function is
|
|
58
|
+
* passed an InAppBrowserEvent object as a parameter.
|
|
59
|
+
*/
|
|
60
|
+
removeEventListener(type: channel, callback: InAppBrowserEventListenerOrEventListenerObject): void;
|
|
61
|
+
/** Closes the InAppBrowser window. */
|
|
62
|
+
close(): void;
|
|
63
|
+
/** Hides the InAppBrowser window. Calling this has no effect if the InAppBrowser was already hidden. */
|
|
64
|
+
hide(): void;
|
|
65
|
+
/**
|
|
66
|
+
* Displays an InAppBrowser window that was opened hidden. Calling this has no effect
|
|
67
|
+
* if the InAppBrowser was already visible.
|
|
68
|
+
*/
|
|
69
|
+
show(): void;
|
|
70
|
+
/**
|
|
71
|
+
* Injects JavaScript code into the InAppBrowser window.
|
|
72
|
+
* @param script Details of the script to run, specifying either a file or code key.
|
|
73
|
+
* @param callback The function that executes after the JavaScript code is injected.
|
|
74
|
+
* If the injected script is of type code, the callback executes with
|
|
75
|
+
* a single parameter, which is the return value of the script, wrapped in an Array.
|
|
76
|
+
* For multi-line scripts, this is the return value of the last statement,
|
|
77
|
+
* or the last expression evaluated.
|
|
78
|
+
*/
|
|
79
|
+
executeScript(script: { code: string } | { file: string }, callback: (result: any) => void): void;
|
|
80
|
+
/**
|
|
81
|
+
* Injects CSS into the InAppBrowser window.
|
|
82
|
+
* @param css Details of the script to run, specifying either a file or code key.
|
|
83
|
+
* @param callback The function that executes after the CSS is injected.
|
|
84
|
+
*/
|
|
85
|
+
insertCSS(css: { code: string } | { file: string }, callback: () => void): void;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
type InAppBrowserEventListenerOrEventListenerObject = InAppBrowserEventListener | InAppBrowserEventListenerObject;
|
|
89
|
+
|
|
90
|
+
type InAppBrowserEventListener = (evt: InAppBrowserEvent) => void;
|
|
91
|
+
|
|
92
|
+
interface InAppBrowserEventListenerObject {
|
|
93
|
+
handleEvent(evt: InAppBrowserEvent): void;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
interface InAppBrowserEvent extends Event {
|
|
97
|
+
/** the eventname, either loadstart, loadstop, loaderror, or exit. */
|
|
98
|
+
type: string;
|
|
99
|
+
/** the URL that was loaded. */
|
|
100
|
+
url: string;
|
|
101
|
+
/** the error code, only in the case of loaderror. */
|
|
102
|
+
code: number;
|
|
103
|
+
/** the error message, only in the case of loaderror. */
|
|
104
|
+
message: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
interface Cordova {
|
|
108
|
+
InAppBrowser: InAppBrowser;
|
|
109
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
4
|
+
* or more contributor license agreements. See the NOTICE file
|
|
5
|
+
* distributed with this work for additional information
|
|
6
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
7
|
+
* to you under the Apache License, Version 2.0 (the
|
|
8
|
+
* "License"); you may not use this file except in compliance
|
|
9
|
+
* with the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing,
|
|
14
|
+
* software distributed under the License is distributed on an
|
|
15
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
+
* KIND, either express or implied. See the License for the
|
|
17
|
+
* specific language governing permissions and limitations
|
|
18
|
+
* under the License.
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
(function () {
|
|
23
|
+
const exec = require('cordova/exec');
|
|
24
|
+
const channel = require('cordova/channel');
|
|
25
|
+
const modulemapper = require('cordova/modulemapper');
|
|
26
|
+
const urlutil = require('cordova/urlutil');
|
|
27
|
+
|
|
28
|
+
function InAppBrowser () {
|
|
29
|
+
this.channels = {
|
|
30
|
+
beforeload: channel.create('beforeload'),
|
|
31
|
+
loadstart: channel.create('loadstart'),
|
|
32
|
+
loadstop: channel.create('loadstop'),
|
|
33
|
+
loaderror: channel.create('loaderror'),
|
|
34
|
+
exit: channel.create('exit'),
|
|
35
|
+
customscheme: channel.create('customscheme'),
|
|
36
|
+
message: channel.create('message'),
|
|
37
|
+
download: channel.create('download')
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
InAppBrowser.prototype = {
|
|
42
|
+
_eventHandler: function (event) {
|
|
43
|
+
if (event && event.type in this.channels) {
|
|
44
|
+
if (event.type === 'beforeload') {
|
|
45
|
+
this.channels[event.type].fire(event, this._loadAfterBeforeload);
|
|
46
|
+
} else {
|
|
47
|
+
this.channels[event.type].fire(event);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
_loadAfterBeforeload: function (strUrl) {
|
|
52
|
+
strUrl = urlutil.makeAbsolute(strUrl);
|
|
53
|
+
exec(null, null, 'InAppBrowser', 'loadAfterBeforeload', [strUrl]);
|
|
54
|
+
},
|
|
55
|
+
close: function (eventname) {
|
|
56
|
+
exec(null, null, 'InAppBrowser', 'close', []);
|
|
57
|
+
},
|
|
58
|
+
show: function (eventname) {
|
|
59
|
+
exec(null, null, 'InAppBrowser', 'show', []);
|
|
60
|
+
},
|
|
61
|
+
hide: function (eventname) {
|
|
62
|
+
exec(null, null, 'InAppBrowser', 'hide', []);
|
|
63
|
+
},
|
|
64
|
+
addEventListener: function (eventname, f) {
|
|
65
|
+
if (eventname in this.channels) {
|
|
66
|
+
this.channels[eventname].subscribe(f);
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
removeEventListener: function (eventname, f) {
|
|
70
|
+
if (eventname in this.channels) {
|
|
71
|
+
this.channels[eventname].unsubscribe(f);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
executeScript: function (injectDetails, cb) {
|
|
76
|
+
if (injectDetails.code) {
|
|
77
|
+
exec(cb, null, 'InAppBrowser', 'injectScriptCode', [injectDetails.code, !!cb]);
|
|
78
|
+
} else if (injectDetails.file) {
|
|
79
|
+
exec(cb, null, 'InAppBrowser', 'injectScriptFile', [injectDetails.file, !!cb]);
|
|
80
|
+
} else {
|
|
81
|
+
throw new Error('executeScript requires exactly one of code or file to be specified');
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
insertCSS: function (injectDetails, cb) {
|
|
86
|
+
if (injectDetails.code) {
|
|
87
|
+
exec(cb, null, 'InAppBrowser', 'injectStyleCode', [injectDetails.code, !!cb]);
|
|
88
|
+
} else if (injectDetails.file) {
|
|
89
|
+
exec(cb, null, 'InAppBrowser', 'injectStyleFile', [injectDetails.file, !!cb]);
|
|
90
|
+
} else {
|
|
91
|
+
throw new Error('insertCSS requires exactly one of code or file to be specified');
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
addDownloadListener: function (success, error) {
|
|
96
|
+
exec(success, error, 'InAppBrowser', 'downloadListener');
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
module.exports = function (strUrl, strWindowName, strWindowFeatures, callbacks) {
|
|
101
|
+
// Don't catch calls that write to existing frames (e.g. named iframes).
|
|
102
|
+
if (window.frames && window.frames[strWindowName]) {
|
|
103
|
+
const origOpenFunc = modulemapper.getOriginalSymbol(window, 'open');
|
|
104
|
+
return origOpenFunc.apply(window, arguments);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
strUrl = urlutil.makeAbsolute(strUrl);
|
|
108
|
+
const iab = new InAppBrowser();
|
|
109
|
+
|
|
110
|
+
callbacks = callbacks || {};
|
|
111
|
+
for (const callbackName in callbacks) {
|
|
112
|
+
iab.addEventListener(callbackName, callbacks[callbackName]);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const cb = function (eventname) {
|
|
116
|
+
iab._eventHandler(eventname);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
strWindowFeatures = strWindowFeatures || '';
|
|
120
|
+
|
|
121
|
+
exec(cb, cb, 'InAppBrowser', 'open', [strUrl, strWindowName, strWindowFeatures]);
|
|
122
|
+
return iab;
|
|
123
|
+
};
|
|
124
|
+
})();
|