1 Star 0 Fork 0

ryanphang/cefpython

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
DownloadHandler.md 1014 Bytes
一键复制 编辑 原始数据 按行查看 历史

API categories | API index

DownloadHandler

See also Browser.StartDownload().

Preface

In CEF 3 downloads are handled automatically if ApplicationSettings.downloads_enabled is set to True (default). A default SaveAs file dialog provided by OS is displayed. If the download is aborted by user LoadHandler.OnLoadError will get called with errorCode ERR_ABORTED.

There is no download progress available. If you need such feature you will have to create a custom implementation of downloads. It would need to be investigated which callbacks from client handlers would allow for such implementation. Take a look at RequestHandler.OnBeforeBrowse, OnBeforeResourceLoad, and/or ResourceHandler.

On Linux there is a bug and ERR_ABORTED is reported even for successful downloads. See the comments in the wxpython.py example.

A download handler with callbacks like OnBeforeDownload and OnDownloadUpdated may be exposed to CEF Python in the future.

Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ryanphang/cefpython.git
git@gitee.com:ryanphang/cefpython.git
ryanphang
cefpython
cefpython
master

搜索帮助