WebWindow icon indicating copy to clipboard operation
WebWindow copied to clipboard

Support of hosting as control

Open kant2002 opened this issue 5 years ago • 5 comments

I would like to migrate Electron application to WebWindow, but currently as it is lacking support for the menu creation. I for example can host application in Windows Forms, or create menu if I somehow embed WebWindow in WinForms or WPF.

@SteveSandersonMS can I have you opinion what can be done as part of this project, and what can be done outside of it. I willing to contribute if needed.

kant2002 avatar Mar 11 '20 04:03 kant2002

Ok. Seems to be I'm self -solve the issue, but figuring out that there Hwnd property which allow me to do some magic. But I have another question. Seems to be session information does not preserved across different application launches. This seems strange and not intuitive. What is available for persisting data inside browser? Do I need to customize something?

kant2002 avatar Mar 11 '20 08:03 kant2002

Hey @kant2002!

If you're interested in adding support for native OS menus then please feel free to go ahead. I'd be happy to merge a PR as long as it's reasonably consistent with the code already here, and supports Windows, macOS, and Linux.

Seems to be session information does not preserved across different application launches.

Do you mean the cookie collection?

Or do you mean sessionStorage? If you do mean sessionStorage, then try localStorage instead, since that persists beyond a single usage session.

SteveSandersonMS avatar Mar 11 '20 14:03 SteveSandersonMS

@SteveSandersonMS Thanks. Let me summarize my thought on the issues which I have

  • I use OidcClient-JS, so likely it store in session. I do not look closely on the actual implementation. No cookies directly used. But I will reproduce with simple setup and comeback with findings. Session storage wipe is probably predictable. At least was my initial thought. But I'm slightly confused why same setup work for Electron. I have to look, and create small test case. I think it would be worth document my findings to help others.
  • Regarding native menu. Do you want similar configuration like in Electron, where some abstraction over standard menu would be part of WebWindow API ? Or I can better work on example how WebWindow can be embedded into WinForms/WPF? I mainly Windows app developer, but can work on Mac + Windows code too. So this is more question what is aligned with your priority on the library.

kant2002 avatar Mar 11 '20 17:03 kant2002

Do you want similar configuration like in Electron, where some abstraction over standard menu would be part of WebWindow API ? Or I can better work on example how WebWindow can be embedded into WinForms/WPF?

Yes, it would need to be an abstraction.

There's is no WinForms or WPF in here. The Windows implementation is pure Win32, and of course on Mac/Linux it's something else.

SteveSandersonMS avatar Mar 11 '20 17:03 SteveSandersonMS

@kant2002 Take a look at https://github.com/jspuij/BlazorWebView

jspuij avatar Mar 30 '20 15:03 jspuij