flutter-plugins icon indicating copy to clipboard operation
flutter-plugins copied to clipboard

[desktop_webview_window] how to get current web page url

Open lhjandroid opened this issue 2 years ago • 7 comments

This plugin is great nice.but sometimes i want to get current web page url. but i can't find any api to do this. is there any way to do this?

lhjandroid avatar Feb 09 '23 02:02 lhjandroid

such as l launched a video station. and into a Tv series episode one: x/cover/mzc002007knmh3g/n004532bnnn.html episode two: x/cover/mzc002007knmh3g/n004614cdgn.html when I switched from episode one to episode two the OnUrlRequestCallback won't be callbacked

lhjandroid avatar Feb 09 '23 06:02 lhjandroid

when I switched from episode one to episode two the OnUrlRequestCallback won't be callbacked

which platform are you running?

boyan01 avatar Feb 11 '23 12:02 boyan01

when I switched from episode one to episode two the OnUrlRequestCallback won't be callbacked

which platform are you running?

mac

lhjandroid avatar Feb 13 '23 03:02 lhjandroid

I use it to load tencent video station. you can try it if could load this station. https://v.qq.com/ x/cover/mzc002007knmh3g/n004532bnnn.html

lhjandroid avatar Feb 13 '23 03:02 lhjandroid

@lhjandroid 大佬 你解决这个问题了吗? 我也发现了, 好痛苦, 改了半天,没改成功.

huafsud avatar Jul 25 '23 11:07 huafsud

webview .addOnUrlRequestCallback((url) { logger.d('addOnUrlRequestCallback= $url'); });

xiyionxiong avatar Aug 10 '23 05:08 xiyionxiong

@xiyionxiong 感谢, 但是我以前测试过, 在特定网站下, 这个是有问题的,

后来, 我魔改了插件代码的macos swift 代码, 增加了一个获取cookie的方法, 然后 for循环, 一秒获取一次, 当coookie验证通过,则直接关闭窗口了.
其他平台的,不知道怎么改,

huafsud avatar Aug 10 '23 05:08 huafsud