Skip to content

Commit

Permalink
Merge pull request #24 from OutSystems/feature/fixRootNameBug
Browse files Browse the repository at this point in the history
RMET-493: Fix code bug where rootName would be always undefined.
  • Loading branch information
GFOutsystems authored Jan 19, 2021
2 parents 79bfdb3 + 50f78a6 commit 8a0394d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions www/inappbrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@
},
_loadAfterBeforeload: function (strUrl) {
strUrl = urlutil.makeAbsolute(strUrl);
exec(null, null, rootName, 'loadAfterBeforeload', [strUrl]);
exec(null, null, this.rootName, 'loadAfterBeforeload', [strUrl]);
},
close: function (eventname) {
exec(null, null, rootName, 'close', []);
exec(null, null, this.rootName, 'close', []);
},
show: function (eventname) {
exec(null, null, rootName, 'show', []);
exec(null, null, this.rootName, 'show', []);
},
hide: function (eventname) {
exec(null, null, rootName, 'hide', []);
exec(null, null, this.rootName, 'hide', []);
},
addEventListener: function (eventname, f) {
if (eventname in this.channels) {
Expand All @@ -73,19 +73,19 @@

executeScript: function (injectDetails, cb) {
if (injectDetails.code) {
exec(cb, null, rootName, 'injectScriptCode', [injectDetails.code, !!cb]);
exec(cb, null, this.rootName, 'injectScriptCode', [injectDetails.code, !!cb]);
} else if (injectDetails.file) {
exec(cb, null, rootName, 'injectScriptFile', [injectDetails.file, !!cb]);
exec(cb, null, this.rootName, 'injectScriptFile', [injectDetails.file, !!cb]);
} else {
throw new Error('executeScript requires exactly one of code or file to be specified');
}
},

insertCSS: function (injectDetails, cb) {
if (injectDetails.code) {
exec(cb, null, rootName, 'injectStyleCode', [injectDetails.code, !!cb]);
exec(cb, null, this.rootName, 'injectStyleCode', [injectDetails.code, !!cb]);
} else if (injectDetails.file) {
exec(cb, null, rootName, 'injectStyleFile', [injectDetails.file, !!cb]);
exec(cb, null, this.rootName, 'injectStyleFile', [injectDetails.file, !!cb]);
} else {
throw new Error('insertCSS requires exactly one of code or file to be specified');
}
Expand Down

0 comments on commit 8a0394d

Please sign in to comment.