Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ChrisKnott/Eel
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisKnott committed Jun 19, 2018
2 parents 377c359 + 091038c commit 1b0dac0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions eel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
'port': 8000,
'chromeFlags': []
}
_callback = lambda: None

# Public functions

Expand Down Expand Up @@ -85,11 +86,15 @@ def init(path):


def start(*start_urls, **kwargs):
global _callback

block = kwargs.pop('block', True)
options = kwargs.pop('options', {})
size = kwargs.pop('size', None)
position = kwargs.pop('position', None)
geometry = kwargs.pop('geometry', {})

_callback = kwargs.pop('callback', lambda: None)

for k, v in list(_default_options.items()):
if k not in options:
Expand Down Expand Up @@ -256,5 +261,6 @@ def _websocket_close():
# TODO: user definable behavior here
sleep(1.0)
if len(_websockets) == 0:
_callback()
sys.exit()

0 comments on commit 1b0dac0

Please sign in to comment.