Code cleanup

This commit is contained in:
Roman
2017-11-07 23:57:33 +02:00
parent 4995168a68
commit 0ea4bbbb19
2 changed files with 5 additions and 18 deletions

View File

@@ -12,21 +12,12 @@ def evaluate_js():
# Change document background color and print document title
print(webview.evaluate_js(
"""
window.pywebview = {
api: {}
}
var test = function(funcList) {
for (var i = 0; i < funcList.length; i++) {
pywebview.api[funcList[i]] = function (params) {
alert(params)
//return window.external.Invoke(funcList[i], params)
}
}
}
test(['test', 'test2'])
pywebview.api.test('1')
// Turn night mode ON
document.body.style.backgroundColor = '#212121';
document.body.style.color = '#f2f2f2';
// Return document title
document.title;
"""
)
)

View File

@@ -142,10 +142,6 @@ class BrowserView:
if self.first_load:
self.web_browser.Visible = True
self.first_load = False
print('hello')
def on_message(self, sender, args):
print('sender: {0}/nargs: {1}/ntest: {2}'.format(sender, args))
def toggle_fullscreen(self):
if not self.is_fullscreen: