Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion html2image/html2image.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ def __init__(

browser_class = browser_map[browser.lower()]

if isinstance(browser_class, CDPBrowser):
# browser_map stores classes, not instances. Use ``issubclass`` to
# check if the selected browser class supports the Chrome DevTools
# Protocol and therefore expects the ``cdp_port`` argument.
if issubclass(browser_class, CDPBrowser):
self.browser = browser_class(
executable=browser_executable,
flags=custom_flags,
Expand Down
Loading