Merge pull request #100 from loklaan/effects-example-clarification
Minor clarifying correction to keyboard example code.
This commit is contained in:
@@ -434,7 +434,10 @@ app.model({
|
|||||||
namespace: 'input',
|
namespace: 'input',
|
||||||
subscriptions: [
|
subscriptions: [
|
||||||
function (send) {
|
function (send) {
|
||||||
onkeypress = (e) => send('input:print', { payload: e.keyCode })
|
document.addEventListener(
|
||||||
|
'keypress',
|
||||||
|
(e) => send('input:print', { payload: e.keyCode })
|
||||||
|
)
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
effects: {
|
effects: {
|
||||||
|
|||||||
Reference in New Issue
Block a user