Skip to content

Commit

Permalink
update disable & const
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasMerz committed Nov 4, 2023
1 parent 8489b43 commit a9e208a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/browser/InAppBrowserProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,36 +26,36 @@ let browserWrap, popup, navigationButtonsDiv, navigationButtonsDivInner, backBut
function attachNavigationEvents (element, callback) {
const onError = function () {
try {
callback({ type: 'loaderror', url: this.contentWindow.location.href }, { keepCallback: true }); // eslint-disable-line standard/no-callback-literal
callback({ type: 'loaderror', url: this.contentWindow.location.href }, { keepCallback: true }); // eslint-disable-line n/no-callback-literal
} catch (err) {
// blocked by CORS :\
callback({ type: 'loaderror', url: null }, { keepCallback: true }); // eslint-disable-line standard/no-callback-literal
callback({ type: 'loaderror', url: null }, { keepCallback: true }); // eslint-disable-line n/no-callback-literal
}
};

element.addEventListener('pageshow', function () {
try {
callback({ type: 'loadstart', url: this.contentWindow.location.href }, { keepCallback: true }); // eslint-disable-line standard/no-callback-literal
callback({ type: 'loadstart', url: this.contentWindow.location.href }, { keepCallback: true }); // eslint-disable-line n/no-callback-literal
} catch (err) {
// blocked by CORS :\
callback({ type: 'loadstart', url: null }, { keepCallback: true }); // eslint-disable-line standard/no-callback-literal
callback({ type: 'loadstart', url: null }, { keepCallback: true }); // eslint-disable-line n/no-callback-literal
}
});

element.addEventListener('load', function () {
try {
callback({ type: 'loadstop', url: this.contentWindow.location.href }, { keepCallback: true }); // eslint-disable-line standard/no-callback-literal
callback({ type: 'loadstop', url: this.contentWindow.location.href }, { keepCallback: true }); // eslint-disable-line n/no-callback-literal
} catch (err) {
// blocked by CORS :\
callback({ type: 'loadstop', url: null }, { keepCallback: true }); // eslint-disable-line standard/no-callback-literal
callback({ type: 'loadstop', url: null }, { keepCallback: true }); // eslint-disable-line n/no-callback-literal
}
});

element.addEventListener('error', onError);
element.addEventListener('abort', onError);
}

var IAB = {
const IAB = {
close: function (win, lose) {
if (browserWrap) {
// use the "open" function callback so that the exit event is fired properly
Expand Down

0 comments on commit a9e208a

Please sign in to comment.