Skip to content
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

Retrieve current Url of PhotinoWindow? #197

Open
nicholas-brooks opened this issue Jul 10, 2024 · 4 comments
Open

Retrieve current Url of PhotinoWindow? #197

nicholas-brooks opened this issue Jul 10, 2024 · 4 comments
Labels
All OS enhancement New feature or request

Comments

@nicholas-brooks
Copy link

Is there a way of retrieving the current url of a PhotinoWindow instance? Something like:

mainWindow.GetCurrentUrl()

We're looking to save the current state when the user closes the app so we can restore it when they launch it again.

@MikeYeager MikeYeager added enhancement New feature or request All OS labels Jul 11, 2024
@MikeYeager
Copy link
Collaborator

@nicholas-brooks We don't currently have this functionality, though we would consider adding it when time permits. As a work-around, you can use JavaScript to monitor navigation events and send those to C# via window.external.sendMessage() calls and save the current value for use upon closing.

@nicholas-brooks
Copy link
Author

Thanks @MikeYeager. Happy to help add this feature in - any pointers in doing so?

@MikeYeager
Copy link
Collaborator

@nicholas-brooks We have to implement the feature in the C++ code for Windows (Win32), Linux (GTK) and Mac (Cocoa) in the Photino.Native project. In each case we'll have to hook into the native web view control and handle the navigation events, and store the URL in a local variable. Then we can add a call like the one you described to the interface to retrieve that value. Are you a C++ developer? We always appreciate help!

@nicholas-brooks
Copy link
Author

@MikeYeager - Thanks for the response. I haven't done C++ development for a very long time but that wouldn't stop me from contributing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
All OS enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants