-
Notifications
You must be signed in to change notification settings - Fork 144
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
新版本为何没有onBeforeBrowse重载了, 想要阻断redirect需要怎么操作呢 #415
Comments
看了一下相关提交,没有 |
是的, 我也没找到, 但最近接手的一个老项目, 里面的qcefview.h里面有这个 /// Gets called before the main browser redirect url /// /// /// /// /// /// virtual bool onBeforeBrowse(qint64 frameId, const std::string& url, const bool user_gesture, const bool is_redirect); 我在将老项目升级为64位时发现新版没有这个方法了 |
想问下没有这个onBeforeBrowse方法, 还有别的方式能拦截window.location.href这种redirect吗 |
仓库没错, 头文件就是跟这个仓库一样的,里面的用法也是QCefview, 但是之前有onBeforeBrowse, 升级dll后编译报错了 |
可以参考文档,看哪个函数能够实现您的目的。感觉可以通过addressChanged进行判断。 |
QCefView没有暴露过这个接口给上层,需要的话你自己实现就行了。 |
不行, adressChanged是 ed ,代表是改变之后的, 不能阻断redirect |
如题
新版本为何没有onBeforeBrowse重载了, 想要阻断redirect需要怎么操作呢
The text was updated successfully, but these errors were encountered: