cztomczak / cefpython

Python bindings for the Chromium Embedded Framework (CEF)
Other
3.02k stars 469 forks source link

OnBeforeDownload and OnDownloadUpdated to be exposed to CEF Python #628

Open karolyjozsa opened 2 years ago

karolyjozsa commented 2 years ago

The https://github.com/cztomczak/cefpython/blob/master/api/DownloadHandler.md#downloadhandler API docs say: "OnBeforeDownload and OnDownloadUpdated may be exposed to CEF Python in the future". Without this, avoiding the "Save As" dialogue is not easy, if possible at all. In the discussion https://groups.google.com/g/cefpython/c/YgnM4EMaz6I/m/XrgHbeBCCwAJ, Czarek proposed us using the OnBeforeResourceLoad and OnBeforeBrowse callbacks of the RequestHandler, but this is a possible work-around only. I thought I would raise this issue, so that its necessity is emphasised, and probably the implementation of exposing the DownloadHandler callbacks to Python is not a big job compared to its big benefit.