Adding ESC key press action.
This commit is contained in:
@@ -12,6 +12,9 @@ class View:
|
||||
self.vdom = h('div', {}, "Loading...")
|
||||
self.model = None
|
||||
patch(container, self.vdom)
|
||||
|
||||
# this does not work on parent div, so attaching to document here
|
||||
document.addEventListener("keyup", msg(KeyboardPress()))
|
||||
|
||||
def view(self, model):
|
||||
self.model = model
|
||||
|
||||
Reference in New Issue
Block a user