Skip to content

add isDevToolsOpen #8063

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 26, 2024
Merged

add isDevToolsOpen #8063

merged 6 commits into from
Aug 26, 2024

Conversation

jonlepage
Copy link
Contributor

@jonlepage jonlepage commented May 4, 2023

fix: #4487

@ayushmanchhabra ayushmanchhabra requested a review from rogerwang June 8, 2023 15:16
@bmatusiak
Copy link

so, when i run

chrome.windows.getAll({ populate: true, windowTypes:['devtools'] }, function( wins ) {
      return wins.length > 0;
    })

it returns undefined, so it seems the callback acts async

{
    "node": "21.1.0",
    "nw": "0.83.0",
    "nw-flavor": "sdk",
    "chromium": "120.0.6099.129"
}

Co-authored-by: Ayushman Chhabra <14110965+ayushmanchhabra@users.noreply.github.com>
@rogerwang rogerwang changed the base branch from nw75 to nw91 August 26, 2024 16:07
@rogerwang
Copy link
Member

Please fix the documentation as well.

@rogerwang
Copy link
Member

no need to update nw_api_window.js ...

@ayushmanchhabra
Copy link
Contributor

ayushmanchhabra commented Aug 26, 2024

Please fix the documentation as well.

@jonlepage please remove mention of isDevToolsOpen from the known issues

also if you could add in example usage here such as nw.Window.isOpenDevTools((status) => console.log(status)), that would be great

@jonlepage
Copy link
Contributor Author

Please fix the documentation as well.

@jonlepage please remove mention of isDevToolsOpen from the known issues, thanks

Sorry, I don't understand. I don't see any trace of JSDoc for the documentation, and if you are referring to TypeScript documentation, it should be edited at https://github.com/DefinitelyTyped/DefinitelyTyped

@rogerwang
Copy link
Member

https://github.com/nwjs/nw.js/blob/nw91/docs/References/Window.md

@ayushmanchhabra
Copy link
Contributor

@jonlepage please remove mention of isDevToolsOpen from the known issues

https://github.com/nwjs/nw.js/blob/nw91/docs/For%20Users/Migration/From%200.12%20to%200.13.md

@jonlepage sorry should have linked the Markdown docs

@jonlepage
Copy link
Contributor Author

done, sry for the time, I was a bit lost because I no longer had the fork on my server. So, I used the one from GitHub, which threw me off a bit for navigation. But it should be fine now. :)

you can see he have some bug ! and sometime file not appear ~ congrat Microsoft :)🙄
image

@@ -59,7 +59,7 @@
### Known issues

+ The following window options passed to `nw.Window.open()` is not effective on **Linux**: `resizable` for now; try to set them in the callback.
+ `reloadDev()` and `isDevToolsOpen()` of `nw.Window` are not supported for now
+ `reloadDev()` of `nw.Window` are not supported for now
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ `reloadDev()` of `nw.Window` are not supported for now
+ `reloadDev()` of `nw.Window` is not supported for now

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last nit and should be good to go

@ayushmanchhabra
Copy link
Contributor

@rogerwang this looks good to me, let us know if any other changes are required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

win has no isDevToolsOpen method
4 participants