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

Provide Browser.getCookieStore() or ability to list existing cookies. #1505

Open
laeubi opened this issue Oct 6, 2024 · 0 comments
Open

Comments

@laeubi
Copy link
Contributor

laeubi commented Oct 6, 2024

Is your feature request related to a problem? Please describe.

Today I wanted to interface the native (Browser) Cookies with the java URL CookieHandler, for that purpose one usually would use a CookieManager with a CookieStore, sadly SWT lacks some important functionality to implement this interface especially the option to list cookies.

Describe the solution you'd like

At best there would be a method Browser#getCookieStore() that returns a CookieStore that is in sync with the native Browser instances. As CookieStore is part of base java this would not impose any additional requirements here and would greatly simplify such tasks instead of having different implementations. As the Browser Cookie API is static anyways one can directly call the native methods in such implementation.

Describe alternatives you've considered

As an alternative, there should be methods to list all current cookies to allow client to implement their own.

Additional context

This would greatly increase the interoperability of SWT browser and the surrounding application, currently an application that want to share cookie data with a browser instance must explicitly know the names and URLs of cookies it likes to share.

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

No branches or pull requests

1 participant