Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 321b34a

Browse filesBrowse files
committed
Update docs for 56.2 release. Do not call client handlers nor
javascript bindings in DevTools windows (cztomczak#344). Update Tutorial and tutorial.py example.
1 parent eeae125 commit 321b34a
Copy full SHA for 321b34a

File tree

Expand file treeCollapse file tree

5 files changed

+11
-28
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+11
-28
lines changed
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ also download packages for offline installation available on the
4343
[GitHub Releases](../../releases) pages.
4444

4545
```
46-
pip install cefpython3==56.1
46+
pip install cefpython3==56.2
4747
```
4848

4949
## Tutorial
Collapse file

‎docs/Migration-guide.md‎

Copy file name to clipboardExpand all lines: docs/Migration-guide.md
+5-6Lines changed: 5 additions & 6 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,11 @@ Table of contents:
4040

4141
## v50+ Distribution packages
4242

43-
In latest CEF Python there are only two distribution packages
44-
available. The first one is a wheel package distributed through
45-
PyPI, which you can install using the pip tool (8.1+ required
46-
on Linux). The second one is a setup package available for
47-
download on the GitHub Releases pages, instructions on how to
48-
install it are provided in README.txt.
43+
In latest CEF Python there is only one distribution package
44+
available: a wheel package. Wheel packages are distributed on
45+
[PyPI](https://pypi.python.org/pypi/cefpython3) and you can
46+
install it using the pip tool (8.1+ required on Linux). You
47+
can also download wheel packages from [GitHub Releases](../../../releases).
4948

5049
**Windows**
5150

Collapse file

‎docs/Tutorial.md‎

Copy file name to clipboardExpand all lines: docs/Tutorial.md
+1-5Lines changed: 1 addition & 5 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Run the commands below to install the cefpython3 package, clone
3636
the repository and run the Hello World example:
3737

3838
```commandline
39-
pip install cefpython3==56.1
39+
pip install cefpython3==56.2
4040
git clone https://github.com/cztomczak/cefpython.git
4141
cd cefpython/examples/
4242
python hello_world.py
@@ -320,10 +320,6 @@ def set_client_handlers(browser):
320320
...
321321
class LoadHandler(object):
322322
def OnLoadingStateChange(self, browser, is_loading, **_):
323-
# Issue #344 will fix this in next release, so that client
324-
# handlers are not called for Developer Tools windows.
325-
if browser.GetUrl().startswith("chrome-devtools://"):
326-
return
327323
# This callback is called twice, once when loading starts
328324
# (is_loading=True) and second time when loading ends
329325
# (is_loading=False).
Collapse file

‎examples/Examples-README.md‎

Copy file name to clipboardExpand all lines: examples/Examples-README.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Instructions to install the cefpython3 package, clone the repository
1111
and run the hello_world.py example:
1212

1313
```
14-
pip install cefpython3==56.1
14+
pip install cefpython3==56.2
1515
git clone https://github.com/cztomczak/cefpython.git
1616
cd cefpython/examples/
1717
python hello_world.py
Collapse file

‎examples/tutorial.py‎

Copy file name to clipboardExpand all lines: examples/tutorial.py
+3-15Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Tutorial example. Doesn't depend on any third party GUI framework.
2-
# Tested with CEF Python v56.1+
2+
# Tested with CEF Python v56.2+
33

44
from cefpython3 import cefpython as cef
55
import base64
@@ -61,7 +61,7 @@ def main():
6161
cef.Initialize()
6262
set_global_handler()
6363
browser = cef.CreateBrowserSync(url=html_to_data_uri(HTML_code),
64-
window_title="Hello World!")
64+
window_title="Tutorial")
6565
set_client_handlers(browser)
6666
set_javascript_bindings(browser)
6767
cef.MessageLoop()
@@ -72,7 +72,7 @@ def check_versions():
7272
print("[tutorial.py] CEF Python {ver}".format(ver=cef.__version__))
7373
print("[tutorial.py] Python {ver} {arch}".format(
7474
ver=platform.python_version(), arch=platform.architecture()[0]))
75-
assert cef.__version__ >= "56.1", "CEF Python v56.1+ required to run this"
75+
assert cef.__version__ >= "56.2", "CEF Python v56.2+ required to run this"
7676

7777

7878
def html_to_data_uri(html, js_callback=None):
@@ -125,10 +125,6 @@ def js_print(browser, lang, event, msg):
125125

126126
class GlobalHandler(object):
127127
def OnAfterCreated(self, browser, **_):
128-
# Issue #344 will fix this in next release, so that client
129-
# handlers are not called for Developer Tools windows.
130-
if browser.GetUrl().startswith("chrome-devtools://"):
131-
return
132128
# DOM is not yet loaded. Using js_print at this moment will
133129
# throw an error: "Uncaught ReferenceError: js_print is not defined".
134130
# We make this error on purpose. This error will be intercepted
@@ -143,10 +139,6 @@ def OnAfterCreated(self, browser, **_):
143139

144140
class LoadHandler(object):
145141
def OnLoadingStateChange(self, browser, is_loading, **_):
146-
# Issue #344 will fix this in next release, so that client
147-
# handlers are not called for Developer Tools windows.
148-
if browser.GetUrl().startswith("chrome-devtools://"):
149-
return
150142
# This callback is called twice, once when loading starts
151143
# (is_loading=True) and second time when loading ends
152144
# (is_loading=False).
@@ -158,10 +150,6 @@ def OnLoadingStateChange(self, browser, is_loading, **_):
158150

159151
class DisplayHandler(object):
160152
def OnConsoleMessage(self, browser, message, **_):
161-
# Issue #344 will fix this in next release, so that client
162-
# handlers are not called for Developer Tools windows.
163-
if browser.GetUrl().startswith("chrome-devtools://"):
164-
return
165153
# This will intercept js errors, see comments in OnAfterCreated
166154
if "error" in message.lower() or "uncaught" in message.lower():
167155
# Prevent infinite recurrence in case something went wrong

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.