Skip to content

Commit

Permalink
Avoid DOM access in UWP new window
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaifroid committed Feb 1, 2024
1 parent 51435c6 commit 82e9a74
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6180,8 +6180,10 @@ function displayArticleContentInContainer (dirEntry, htmlArticle) {
articleContainer.kiwixType = 'iframe';
articleWindow = articleContainer.contentWindow;
}

articleDocument = articleWindow.document.documentElement;
// We can't access the DOM of a new Window in the UWP app
if (!(/UWP/.test(params.appType) && appstate.target !== 'iframe')) {
articleDocument = articleWindow.document.documentElement;
}

// Inject htmlArticle into iframe
// uiUtil.pollSpinner(); //Void progress messages
Expand Down

0 comments on commit 82e9a74

Please sign in to comment.