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

FR: launch函数 #7

Open
HuanLinOTO opened this issue Jan 15, 2023 · 1 comment
Open

FR: launch函数 #7

HuanLinOTO opened this issue Jan 15, 2023 · 1 comment

Comments

@HuanLinOTO
Copy link
Member

HuanLinOTO commented Jan 15, 2023

想要实现一个什么效果

新增一个「launch」函数,用于启动一个独立的浏览器

返回值可为Promise

因为什么做不到

我有个对于「九天」平台的工具箱,需要使用pptr进行登录后拦截数据,但是如果两个人同时使用命令就会导致覆盖cookie

如果什么就能做到了

同浏览器不同page隔离cookie

或者不同浏览器之间隔离cookie

如果有别的办法做到请告诉我

@MaikoTan
Copy link
Member

It is possible to manipulate the document.cookie between every command invokes. So I think it would be a better solution for your use case.

As if you launch multiple instances, it would spend massive memory if there were many people invoking commands synchronously.


在不同的指令调用之间操作 document.cookie 是可能的。所以我想这是对你的使用情况的一个更好的方法。

好像你“启动”了多个实例,如果有很多人同步调用命令,它将花费大量内存。

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

2 participants