diff --git a/README.md b/README.md index 15142cd..ca4bec2 100644 --- a/README.md +++ b/README.md @@ -434,7 +434,10 @@ app.model({ namespace: 'input', subscriptions: [ function (send) { - onkeypress = (e) => send('input:print', { payload: e.keyCode }) + document.addEventListener( + 'keypress', + (e) => send('input:print', { payload: e.keyCode }) + ) } ], effects: {