wangyu190810 / cefpython

Automatically exported from code.google.com/p/cefpython
0 stars 0 forks source link

JSDialogHandler patch #118

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I implemented the JSDialogHandle. This mainly to be able to suppress the 
dialogs for the offscreen-rendering with kivy.

Didn't implemented the callback tough.

Patch attached. Changes are also visible on github [0].
I saw your issue about moving the repo to github. I'd really favor this. Sadly 
I never moved a repo from g-code to github so I can't assist you with tipps.

[0] 
https://github.com/jegger/cefpython/commit/074720ed56642339682cbab8bc4aca21ca4c6
984

Original issue reported on code.google.com by jegg...@gmail.com on 19 Mar 2014 at 7:47

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by czarek.t...@gmail.com on 8 Apr 2014 at 7:02

GoogleCodeExporter commented 9 years ago

Original comment by czarek.t...@gmail.com on 9 Apr 2014 at 6:43

GoogleCodeExporter commented 9 years ago
I've implemented the callback for OnJSDialog. See attached patch or on my 
github fork.

Original comment by jegg...@gmail.com on 17 Apr 2014 at 8:31

Attachments:

GoogleCodeExporter commented 9 years ago
Just implemented OnBeforeUnloadDialog. Updated patch attached.

Original comment by jegg...@gmail.com on 17 Apr 2014 at 8:52

Attachments:

GoogleCodeExporter commented 9 years ago
Can you please also implement OnResetDialogState and OnDialogClosed to make it 
complete? These have only 1 parameter (browser), so it should be 
straightforward and wouldn't require much code.

Original comment by czarek.t...@gmail.com on 17 Apr 2014 at 9:05

GoogleCodeExporter commented 9 years ago
Those functions are now implemented too. Don't know why I've left them out as 
they weren't much work... 

Original comment by jegg...@gmail.com on 18 Apr 2014 at 6:16

Attachments:

GoogleCodeExporter commented 9 years ago
@jeggerr Thank you for the patch.

The patch has been applied with some modifications. The naming of the callbacks 
has changed to stay consistent with other cefpython handlers. There was a bug 
in the OnBeforeUnloadDialog, the is_reload param is not passed by reference, so 
it is not allowed to be changed. Javascript dialog types constants were 
exposed. Created the JavascriptDialogHandler wiki page.

Fixed in revision 35df04d5b6c0.

Original comment by czarek.t...@gmail.com on 29 Jul 2014 at 3:18