cordova-plugin-inappbrowser-patch 6.0.1 → 6.1.0

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 CHANGED
@@ -8,12 +8,12 @@
8
8
  # "License"); you may not use this file except in compliance
9
9
  # with the License. You may obtain a copy of the License at
10
10
  #
11
- # http://www.apache.org/licenses/LICENSE-2.0
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
12
  #
13
13
  # Unless required by applicable law or agreed to in writing,
14
14
  # software distributed under the License is distributed on an
15
15
  # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- # KIND, either express or implied. See the License for the
16
+ # KIND, either express or implied. See the License for the
17
17
  # specific language governing permissions and limitations
18
18
  # under the License.
19
19
  #
package/README.md CHANGED
@@ -3,25 +3,26 @@ title: Inappbrowser
3
3
  description: Open an in-app browser window.
4
4
  ---
5
5
  <!--
6
- # license: Licensed to the Apache Software Foundation (ASF) under one
7
- # or more contributor license agreements. See the NOTICE file
8
- # distributed with this work for additional information
9
- # regarding copyright ownership. The ASF licenses this file
10
- # to you under the Apache License, Version 2.0 (the
11
- # "License"); you may not use this file except in compliance
12
- # with the License. You may obtain a copy of the License at
13
6
  #
14
- # http://www.apache.org/licenses/LICENSE-2.0
7
+ # Licensed to the Apache Software Foundation (ASF) under one
8
+ # or more contributor license agreements. See the NOTICE file
9
+ # distributed with this work for additional information
10
+ # regarding copyright ownership. The ASF licenses this file
11
+ # to you under the Apache License, Version 2.0 (the
12
+ # "License"); you may not use this file except in compliance
13
+ # with the License. You may obtain a copy of the License at
14
+ #
15
+ # http://www.apache.org/licenses/LICENSE-2.0
16
+ #
17
+ # Unless required by applicable law or agreed to in writing,
18
+ # software distributed under the License is distributed on an
19
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20
+ # KIND, either express or implied. See the License for the
21
+ # specific language governing permissions and limitations
22
+ # under the License.
15
23
  #
16
- # Unless required by applicable law or agreed to in writing,
17
- # software distributed under the License is distributed on an
18
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19
- # KIND, either express or implied. See the License for the
20
- # specific language governing permissions and limitations
21
- # under the License.
22
24
  -->
23
25
 
24
-
25
26
  # cordova-plugin-inappbrowser
26
27
 
27
28
  [![Android Testsuite](https://github.com/apache/cordova-plugin-inappbrowser/actions/workflows/android.yml/badge.svg)](https://github.com/apache/cordova-plugin-inappbrowser/actions/workflows/android.yml) [![Chrome Testsuite](https://github.com/apache/cordova-plugin-inappbrowser/actions/workflows/chrome.yml/badge.svg)](https://github.com/apache/cordova-plugin-inappbrowser/actions/workflows/chrome.yml) [![iOS Testsuite](https://github.com/apache/cordova-plugin-inappbrowser/actions/workflows/ios.yml/badge.svg)](https://github.com/apache/cordova-plugin-inappbrowser/actions/workflows/ios.yml) [![Lint Test](https://github.com/apache/cordova-plugin-inappbrowser/actions/workflows/lint.yml/badge.svg)](https://github.com/apache/cordova-plugin-inappbrowser/actions/workflows/lint.yml)
@@ -162,12 +163,6 @@ instance, or the system browser.
162
163
  var ref = cordova.InAppBrowser.open('https://apache.org', '_blank', 'location=yes');
163
164
  var ref2 = cordova.InAppBrowser.open(encodeURI('http://ja.m.wikipedia.org/wiki/ハングル'), '_blank', 'location=yes');
164
165
 
165
- ### OSX Quirks
166
-
167
- At the moment the only supported target in OSX is `_system`.
168
-
169
- `_blank` and `_self` targets are not yet implemented and are ignored silently. Pull requests and patches to get these to work are greatly appreciated.
170
-
171
166
  ### iOS Quirks
172
167
 
173
168
  Since the introduction of iPadOS 13, iPads try to adapt their content mode / user agent for the optimal browsing experience. This may result in iPads having their user agent set to Macintosh, making it hard to detect them as mobile devices using user agent string sniffing. You can change this with the `PreferredContentMode` preference in `config.xml`.
@@ -214,6 +209,7 @@ The object returned from a call to `cordova.InAppBrowser.open` when the target i
214
209
  - __exit__: event fires when the `InAppBrowser` window is closed.
215
210
  - __beforeload__: event fires when the `InAppBrowser` decides whether to load an URL or not (only with option `beforeload` set).
216
211
  - __message__: event fires when the `InAppBrowser` receives a message posted from the page loaded inside the `InAppBrowser` Webview.
212
+ - __customscheme__: event fires when a link is followed that matches `AllowedSchemes`.
217
213
  - __download__: _(Android Only)_ event fires when the `InAppBrowser` loads a URL that leads in downloading of a file.
218
214
 
219
215
  - __callback__: the function that executes when the event fires. The function is passed an `InAppBrowserEvent` object as a parameter.
@@ -315,6 +311,36 @@ function messageCallBack(params){
315
311
  }
316
312
 
317
313
  ```
314
+
315
+ ### Customscheme event Example
316
+
317
+ Sometimes you may want to respond to an event happening on the page loaded in the browser,
318
+ for example a button to open the barcode scanner, or closing the browser when a login flow
319
+ was finished. This can done by navigating to a URL with a custom scheme listed in the
320
+ `AllowedSchemes` preference in `config.xml`, triggering a `customscheme` event on the
321
+ browser. Multiple values are separated by comma's.
322
+
323
+ - **type** _it contains the String value "customscheme" always_
324
+ - **url** _The url with custom scheme that triggered the event_
325
+
326
+ In `config.xml`, include the following:
327
+ ```xml
328
+ <preference name="AllowedSchemes" value="app" />
329
+ ```
330
+
331
+ ```javascript
332
+ function onCustomScheme(e) {
333
+ if (e.url === 'app://hide') {
334
+ inAppBrowserRef.hide();
335
+ }
336
+ }
337
+
338
+ inAppBrowserRef = cordova.InAppBrowser.open('https://example.com', '_blank');
339
+ inAppBrowserRef.addEventListener('customscheme', onCustomScheme);
340
+ ```
341
+
342
+ When the opened page navigates to the link `app://hide`, the browser is hidden.
343
+
318
344
  #### Download event Example
319
345
 
320
346
  Whenever the InAppBrowser receives or locates to a url which leads in downloading a file, the callback assigned to the "download" event is called. The parameter passed to this callback is an object with the the following properties
@@ -346,11 +372,11 @@ function downloadListener(params){
346
372
 
347
373
  ### InAppBrowserEvent Properties
348
374
 
349
- - __type__: the eventname, either `loadstart`, `loadstop`, `loaderror`, `message` or `exit`. _(String)_
375
+ - __type__: the eventname, either `loadstart`, `loadstop`, `loaderror`, `exit`, `message` or `customscheme`. _(String)_
350
376
  - __url__: the URL that was loaded. _(String)_
351
377
  - __code__: the error code, only in the case of `loaderror`. _(Number)_
352
378
  - __message__: the error message, only in the case of `loaderror`. _(String)_
353
- - __data__: the message contents , only in the case of `message`. A stringified JSON object. _(String)_
379
+ - __data__: the message contents, only in the case of `message`. A stringified JSON object. _(String)_
354
380
 
355
381
  ### Supported Platforms
356
382
 
@@ -360,7 +386,7 @@ function downloadListener(params){
360
386
 
361
387
  ### Browser Quirks
362
388
 
363
- `loadstart`, `loaderror`, `message` events are not fired.
389
+ `loadstart`, `loaderror`, `message`, `customscheme` events are not fired.
364
390
 
365
391
  ### Quick Example
366
392
 
@@ -382,6 +408,7 @@ function downloadListener(params){
382
408
  - __loaderror__: event fires when the `InAppBrowser` encounters an error loading a URL.
383
409
  - __exit__: event fires when the `InAppBrowser` window is closed.
384
410
  - __message__: event fires when the `InAppBrowser` receives a message posted from the page loaded inside the `InAppBrowser` Webview.
411
+ - __customscheme__: event fires when a link is followed that matches `AllowedSchemes`.
385
412
  - __download__: _(Android only)_ event fires when the `InAppBrowser` loads a URL that leads in downloading of a file.
386
413
 
387
414
  - __callback__: the function to execute when the event fires.
package/RELEASENOTES.md CHANGED
@@ -7,13 +7,13 @@
7
7
  # to you under the Apache License, Version 2.0 (the
8
8
  # "License"); you may not use this file except in compliance
9
9
  # with the License. You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
13
  # Unless required by applicable law or agreed to in writing,
14
14
  # software distributed under the License is distributed on an
15
15
  # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- # KIND, either express or implied. See the License for the
16
+ # KIND, either express or implied. See the License for the
17
17
  # specific language governing permissions and limitations
18
18
  # under the License.
19
19
  #
@@ -0,0 +1,45 @@
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
+ const { defineConfig } = require('eslint/config');
21
+ const nodeConfig = require('@cordova/eslint-config/node');
22
+ const nodeTestConfig = require('@cordova/eslint-config/node-tests');
23
+ const browserConfig = require('@cordova/eslint-config/browser-tests');
24
+
25
+ module.exports = defineConfig([
26
+ ...browserConfig.map(config => ({
27
+ ...config,
28
+ languageOptions: {
29
+ ...(config?.languageOptions || {}),
30
+ globals: {
31
+ ...(config.languageOptions?.globals || {}),
32
+ require: 'readonly',
33
+ module: 'readonly'
34
+ }
35
+ }
36
+ })),
37
+ ...nodeConfig.map(config => ({
38
+ files: ['eslint.config.js'],
39
+ ...config
40
+ })),
41
+ ...nodeTestConfig.map(config => ({
42
+ files: ['tests/**/*.js'],
43
+ ...config
44
+ }))
45
+ ]);
@@ -0,0 +1,19 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one
2
+ # or more contributor license agreements. See the NOTICE file
3
+ # distributed with this work for additional information
4
+ # regarding copyright ownership. The ASF licenses this file
5
+ # to you under the Apache License, Version 2.0 (the
6
+ # "License"); you may not use this file except in compliance
7
+ # with the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ # Empty for the release audit workflow.
19
+ # The `license-config` is required even if there are no custom configs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cordova-plugin-inappbrowser-patch",
3
- "version": "6.0.1",
3
+ "version": "6.1.0",
4
4
  "description": "Cordova InAppBrowser Plugin",
5
5
  "types": "./types/index.d.ts",
6
6
  "cordova": {
@@ -11,8 +11,8 @@
11
11
  "ios"
12
12
  ]
13
13
  },
14
- "repository": "github:ipunkvizard/cordova-plugin-inappbrowser",
15
- "bugs": "https://github.com/ipunkvizard/cordova-plugin-inappbrowser/issues",
14
+ "repository": "github:apache/cordova-plugin-inappbrowser",
15
+ "bugs": "https://github.com/apache/cordova-plugin-inappbrowser/issues",
16
16
  "keywords": [
17
17
  "cordova",
18
18
  "in",
@@ -42,9 +42,14 @@
42
42
  "cordova-ios": ">=6.0.0",
43
43
  "cordova": ">=9.0.0"
44
44
  },
45
- "6.0.1-dev": {
45
+ "6.0.0": {
46
46
  "cordova-android": ">=10.0.0",
47
- "cordova-ios": ">=6.0.0",
47
+ "cordova-ios": ">=6.2.0",
48
+ "cordova": ">=9.0.0"
49
+ },
50
+ "6.1.0-dev": {
51
+ "cordova-android": ">=10.0.0",
52
+ "cordova-ios": ">=6.2.0",
48
53
  "cordova": ">=9.0.0"
49
54
  },
50
55
  "7.0.0": {
@@ -55,6 +60,6 @@
55
60
  "author": "Apache Software Foundation",
56
61
  "license": "Apache-2.0",
57
62
  "devDependencies": {
58
- "@cordova/eslint-config": "^5.0.0"
63
+ "@cordova/eslint-config": "^6.0.0"
59
64
  }
60
- }
65
+ }
package/plugin.xml CHANGED
@@ -1,26 +1,27 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
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.
3
+ #
4
+ # Licensed to the Apache Software Foundation (ASF) under one
5
+ # or more contributor license agreements. See the NOTICE file
6
+ # distributed with this work for additional information
7
+ # regarding copyright ownership. The ASF licenses this file
8
+ # to you under the Apache License, Version 2.0 (the
9
+ # "License"); you may not use this file except in compliance
10
+ # with the License. You may obtain a copy of the License at
11
+ #
12
+ # http://www.apache.org/licenses/LICENSE-2.0
13
+ #
14
+ # Unless required by applicable law or agreed to in writing,
15
+ # software distributed under the License is distributed on an
16
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
+ # KIND, either express or implied. See the License for the
18
+ # specific language governing permissions and limitations
19
+ # under the License.
20
+ #
19
21
  -->
20
-
21
22
  <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
22
23
  id="cordova-plugin-inappbrowser-patch"
23
- version="6.0.1">
24
+ version="6.1.0">
24
25
 
25
26
  <name>InAppBrowser</name>
26
27
  <description>Cordova InAppBrowser Plugin</description>
@@ -32,7 +33,7 @@
32
33
  <engines>
33
34
  <engine name="cordova" version=">=9.0.0"/>
34
35
  <engine name="cordova-android" version=">=9.0.0" />
35
- <engine name="cordova-ios" version=">=6.0.0" />
36
+ <engine name="cordova-ios" version=">=6.2.0" />
36
37
  </engines>
37
38
 
38
39
  <!-- android -->
@@ -1,21 +1,22 @@
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.
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
18
  */
19
+
19
20
  package org.apache.cordova.inappbrowser;
20
21
 
21
22
  import android.annotation.SuppressLint;
@@ -470,7 +471,7 @@ public class InAppBrowser extends CordovaPlugin {
470
471
  intent.setData(uri);
471
472
  }
472
473
  intent.putExtra(Browser.EXTRA_APPLICATION_ID, cordova.getActivity().getPackageName());
473
-
474
+
474
475
  if (features != null) {
475
476
  String launchNewTask = features.get(LAUNCH_NEW_TASK);
476
477
  if (launchNewTask != null) {
@@ -481,6 +482,7 @@ public class InAppBrowser extends CordovaPlugin {
481
482
  if (launchInNewTask) {
482
483
  intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
483
484
  }
485
+
484
486
  // CB-10795: Avoid circular loops by preventing it from opening in the current app
485
487
  this.openExternalExcludeCurrentApp(intent);
486
488
  return "";
@@ -1,21 +1,22 @@
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.
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
18
  */
19
+
19
20
  package org.apache.cordova.inappbrowser;
20
21
 
21
22
  import android.app.AlertDialog;
@@ -1,21 +1,22 @@
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.
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
18
  */
19
+
19
20
  package org.apache.cordova.inappbrowser;
20
21
 
21
22
  import org.apache.cordova.CordovaWebView;
@@ -1,23 +1,21 @@
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
- */
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
+ */
21
19
 
22
20
  const modulemapper = require('cordova/modulemapper');
23
21
 
@@ -26,28 +24,28 @@ let browserWrap, popup, navigationButtonsDiv, navigationButtonsDivInner, backBut
26
24
  function attachNavigationEvents (element, callback) {
27
25
  const onError = function () {
28
26
  try {
29
- callback({ type: 'loaderror', url: this.contentWindow.location.href }, { keepCallback: true }); // eslint-disable-line n/no-callback-literal
27
+ callback({ type: 'loaderror', url: this.contentWindow.location.href }, { keepCallback: true });
30
28
  } catch (err) {
31
29
  // blocked by CORS :\
32
- callback({ type: 'loaderror', url: null }, { keepCallback: true }); // eslint-disable-line n/no-callback-literal
30
+ callback({ type: 'loaderror', url: null }, { keepCallback: true });
33
31
  }
34
32
  };
35
33
 
36
34
  element.addEventListener('pageshow', function () {
37
35
  try {
38
- callback({ type: 'loadstart', url: this.contentWindow.location.href }, { keepCallback: true }); // eslint-disable-line n/no-callback-literal
36
+ callback({ type: 'loadstart', url: this.contentWindow.location.href }, { keepCallback: true });
39
37
  } catch (err) {
40
38
  // blocked by CORS :\
41
- callback({ type: 'loadstart', url: null }, { keepCallback: true }); // eslint-disable-line n/no-callback-literal
39
+ callback({ type: 'loadstart', url: null }, { keepCallback: true });
42
40
  }
43
41
  });
44
42
 
45
43
  element.addEventListener('load', function () {
46
44
  try {
47
- callback({ type: 'loadstop', url: this.contentWindow.location.href }, { keepCallback: true }); // eslint-disable-line n/no-callback-literal
45
+ callback({ type: 'loadstop', url: this.contentWindow.location.href }, { keepCallback: true });
48
46
  } catch (err) {
49
47
  // blocked by CORS :\
50
- callback({ type: 'loadstop', url: null }, { keepCallback: true }); // eslint-disable-line n/no-callback-literal
48
+ callback({ type: 'loadstop', url: null }, { keepCallback: true });
51
49
  }
52
50
  });
53
51
 
@@ -1,28 +1,24 @@
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
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
9
 
10
- http://www.apache.org/licenses/LICENSE-2.0
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
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
- */
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
19
 
20
20
  #import <UIKit/UINavigationController.h>
21
- #import <Cordova/CDVScreenOrientationDelegate.h>
22
-
23
21
 
24
22
  @interface CDVInAppBrowserNavigationController : UINavigationController
25
23
 
26
- @property (nonatomic, weak) id <CDVScreenOrientationDelegate> orientationDelegate;
27
-
28
24
  @end