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
Copy file name to clipboardExpand all lines: api/JavascriptBindings.md
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,12 +29,6 @@ In CEF 3 communication between javascript and python can only be asynchronous. I
29
29
There are plans to support binding data by reference (a list, dict or object's properties). This would be possible with the use of CefRegisterExtension().
30
30
31
31
32
-
## Example usage
33
-
34
-
See the [wxpython.py](../src/windows/binaries_32bit/wxpython.py) example for an example usage of javascript bindings, javascript callbacks and python callbacks.
Copy file name to clipboardExpand all lines: api/cefpython.md
+26-21Lines changed: 26 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,23 +55,25 @@ All parameters are optional.
55
55
56
56
This function can only be called on the UI thread.
57
57
58
-
The "window_title" parameter will be used only
59
-
when parent window provided in window_info was set to 0.
58
+
The "window_title" parameter will be used only when parent
59
+
window provided in window_info was set to 0. This is for use
60
+
with hello_world.py and tutorial.py examples which don't use
61
+
any third party GUI framework for creation of top-level window.
60
62
61
63
After the call to CreateBrowserSync() the page is not yet loaded,
62
-
if you want your next lines of code to do some stuff on the webpage
63
-
you will have to implement LoadHandler.[OnLoadEnd]((LoadHandler.md#onloadend))
64
+
if you want your next lines of code to do some stuff on the
65
+
webpage you will have to implement LoadHandler.[OnLoadingStateChange]((LoadHandler.md#onloadingstatechange))
64
66
callback.
65
67
66
68
67
69
### ExceptHook
68
70
69
71
| Parameter | Type |
70
72
| --- | --- |
71
-
|excType| - |
72
-
|excValue| - |
73
-
|traceObject| - |
74
-
|__Return__|string|
73
+
|exc_type| - |
74
+
|exc_value| - |
75
+
|exc_trace| - |
76
+
|__Return__|void|
75
77
76
78
Global except hook to exit app cleanly on error. CEF has a multiprocess
77
79
architecture and when exiting you need to close all processes (main Browser
@@ -99,6 +101,7 @@ to Initialize(). Returns None if key is not found.
99
101
100
102
|||
101
103
| --- | --- |
104
+
| file_ (optional) | string |
102
105
|__Return__| string |
103
106
104
107
Get path to where application resides.
@@ -181,18 +184,7 @@ Returns true if called on the specified thread.
181
184
182
185
CEF maintains multiple internal threads that are used for handling different types of tasks. The UI thread creates the browser window and is used for all interaction with the webkit rendering engine and V8 Javascript engine. The UI thread will be the same as the main application thread if CefInitialize() is called with an [ApplicationSettings](ApplicationSettings.md) 'multi_threaded_message_loop' option set to false. The IO thread is used for handling schema and network requests. The FILE thread is used for the application cache and other miscellaneous activities.
183
186
184
-
List of threads in the Browser process. These are constants defined in the cefpython module:
185
-
186
-
* TID_UI: The main thread in the browser. This will be the same as the main application thread if cefpython.Initialize() is called with a ApplicationSettings.multi_threaded_message_loop value of false.
187
-
* TID_DB: Used to interact with the database.
188
-
* TID_FILE: Used to interact with the file system.
189
-
* TID_FILE_USER_BLOCKING: Used for file system operations that block user interactions. Responsiveness of this thread affects users.
190
-
* TID_PROCESS_LAUNCHER: Used to launch and terminate browser processes.
191
-
* TID_CACHE: Used to handle slow HTTP cache operations.
192
-
* TID_IO: Used to process IPC and network messages.
193
-
194
-
List of threads in the Renderer process:
195
-
* TID_RENDERER: The main thread in the renderer. Used for all webkit and V8 interaction.
187
+
See PostTask() for a list of threads.
196
188
197
189
198
190
### MessageLoop
@@ -244,10 +236,23 @@ Description from upstream CEF:
244
236
| ... |*args |
245
237
|__Return__| void |
246
238
247
-
Post a task for execution on the thread associated with this task runner. Execution will occur asynchronously. Only Browser process threads are allowed, see IsThread() for a list of available threads and their descriptions.
239
+
Post a task for execution on the thread associated with this task runner. Execution will occur asynchronously. Only Browser process threads are allowed.
248
240
249
241
An example usage is in the wxpython.py example on Windows, in implementation of LifespanHandler.OnBeforePopup().
250
242
243
+
List of threads in the Browser process:
244
+
* cef.TID_UI: The main thread in the browser. This will be the same as the main application thread if cefpython.Initialize() is called with a ApplicationSettings.multi_threaded_message_loop value of false.
245
+
* cef.TID_DB: Used to interact with the database.
246
+
* cef.TID_FILE: Used to interact with the file system.
247
+
* cef.TID_FILE_USER_BLOCKING: Used for file system operations that block user interactions. Responsiveness of this thread affects users.
248
+
* cef.TID_PROCESS_LAUNCHER: Used to launch and terminate browser processes.
249
+
* cef.TID_CACHE: Used to handle slow HTTP cache operations.
250
+
* cef.TID_IO: Used to process IPC and network messages.
251
+
252
+
List of threads in the Renderer process:
253
+
* cef.TID_RENDERER: The main thread in the renderer. Used for all webkit and V8 interaction.
0 commit comments