This commit is contained in:
aozhiwei 2019-10-12 11:16:57 +08:00
parent 772bc1b6bb
commit 4fbba4ca93
2 changed files with 3 additions and 2 deletions

View File

@ -25,7 +25,7 @@ initTab(tab)
tab.call_method("Page.navigate", url="http://localhost:7456/", _timeout=5)
while True:
cmdline= input('')
cmdline= input('').strip()
try:
msg = eval(cmdline)
except Exception as e:

View File

@ -2,8 +2,9 @@
class ScriptMgr:
def __init__(self, tab):
self.scripts = []
self.tab = tab
self.tab.set_listener('Debugger.scriptParsed', self.debuggerOnScriptParsed)
def debuggerOnScriptParsed(self, **kwargs):
print(kwargs)
self.scripts.append(kwargs)