-
Notifications
You must be signed in to change notification settings - Fork 817
feat: allow tab to stay opened after context cancel #1093
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
Conversation
Do we really need the change? Will no calling the |
The use case looks plausible. At a first glance, I can not think of a way to close the connection while keeping the browser opened without modifying Did you observe a low memory and cpu utilization if you apply the change? How about to keep the connection connected while disable all the events? Here is the list of events enabled by Lines 377 to 393 in ac112ec
And we can create the context with |
Yes we observed a huge improvement in our dev environment. The two vertical blue lines show our deployments. We don't want to keep the connection up and running because of potential network disconnects between our regions and regular deployments. Why exactly does the change feel weird to you? Its a small change with huge impact in resiliency and performance for us. |
Sorry for the late reply. It look me some time to figure out the impact of this change.
My first thought is that the context is supposed to manage the lifetime of its target. If the context is cancelled, its target should be closed too. And there is the word But the use case is indeed plausible. And I asked myself, will I need this feature? The answer is yes, I will use this feature to attach to a tab, do something, and detach from the tab without closing it. Here are my suggestions to improve this PR:
|
Thanks for the detailed response! I agree with you on all the points you made. 👍🏼
We could add a suffix like Gonna figure out how to write tests for this project :-) |
Totally agree. Among of them, I like
Please let me know if you need any help. Thank you very much! |
I have a use case in which it is important to not close the tab / browser after the context gets cancelled.
Therefore I introduced a new
ContextOption
. Feel free to discuss :-)