You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since upstream CEF constantly changes, to minimize code breaking when updating to newer CEF, it would be best to use keyword arguments in callbacks, so that when a new argument is added it will not break existing code. And when argument is removed in upstream CEF, we might still keep the old argument for BC.
Using keyword arguments would also be useful in PyCharm so that it doesn't generate warnings when there are unused parameters in callbacks.
For example a callback would be defined like this:
To make this possible, src/handlers/ need to be modified, so that keyword arguments are specified when calling user-provided callback.
This will break existing code! So changes will be required.
There is also a related feature to catch possible errors in parameters when declaring Handlers - Issue #215 "Expose handlers as classes/interfaces: ClientHandler, DisplayHandler, LifespanHandler, etc.". This feature does not conflict with using **kwargs, there would just be two ways for doing it.
The text was updated successfully, but these errors were encountered:
cztomczak
changed the title
Pass keyword arguments to Handlers' callbacks
Pass keyword arguments to Handlers' callbacks and other interfaces
Dec 20, 2016
cztomczak
changed the title
Pass keyword arguments to Handlers' callbacks and other interfaces
Pass keyword arguments to Handlers' callbacks and other interfaces (breaks backward compatibility!)
Dec 20, 2016
…AK!).
Fix focus issue in qt.py and gtk2.py examples during app initial
loading (#284). The solution is to call SetFocus in OnLoadStart once.
Pass keyword arguments to Handlers' callbacks (#291). This will break
many of existing code for Handlers' callbacks. Similar changes were also
applied to: CookieVisitor, StringVisitor, WebRequestClient.
In JavascriptDialogCallback.Continue "userInput" argument was renamed
to "user_input".
Fix PyCharm warnings in kivy_.py example (#285).
Rename JavascriptContextHandler to V8ContextHandler (API docs only
changes).
Update tools/apidocs.py. Sort top-level headings by name.
Since upstream CEF constantly changes, to minimize code breaking when updating to newer CEF, it would be best to use keyword arguments in callbacks, so that when a new argument is added it will not break existing code. And when argument is removed in upstream CEF, we might still keep the old argument for BC.
Using keyword arguments would also be useful in PyCharm so that it doesn't generate warnings when there are unused parameters in callbacks.
For example a callback would be defined like this:
or:
To make this possible, src/handlers/ need to be modified, so that keyword arguments are specified when calling user-provided callback.
This will break existing code! So changes will be required.
There is also a related feature to catch possible errors in parameters when declaring Handlers - Issue #215 "Expose handlers as classes/interfaces: ClientHandler, DisplayHandler, LifespanHandler, etc.". This feature does not conflict with using **kwargs, there would just be two ways for doing it.
The text was updated successfully, but these errors were encountered: