Skip to content

Commit

Permalink
update devtools status in callback
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushmanchhabra committed Sep 1, 2024
1 parent 26b8c63 commit fedc28c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/sanity/window-isdevtoolsopen/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
document.addEventListener('DOMContentLoaded', function() {
const win = nw.Window.get();
win.showDevTools(undefined, () => {
document.getElementById('isdevtoolsopen').textContent = String(win.isDevToolsOpen());
win.isDevToolsOpen((status) => {
document.getElementById('isdevtoolsopen').textContent = String(status);
})
});
});
</script>
Expand Down

0 comments on commit fedc28c

Please sign in to comment.