MCPcopy Index your code
hub / github.com/ronreiter/interactive-tutorials / fastPoll

Function fastPoll

static/js/codemirror/codemirror.js:1329–1338  ·  view source on GitHub ↗
(cm)

Source from the content-addressed store, hash-verified

1327 }
1328
1329 function fastPoll(cm) {
1330 var missed = false;
1331 cm.display.pollingFast = true;
1332 function p() {
1333 var changed = readInput(cm);
1334 if (!changed && !missed) {missed = true; cm.display.poll.set(60, p);}
1335 else {cm.display.pollingFast = false; slowPoll(cm);}
1336 }
1337 cm.display.poll.set(20, p);
1338 }
1339
1340 // prevInput is a hack to work with IME. If we reset the textarea
1341 // on every change, that breaks IME. So we look for changes

Callers 3

registerEventHandlersFunction · 0.85
onKeyPressFunction · 0.85
codemirror.jsFile · 0.85

Calls 1

setMethod · 0.45

Tested by

no test coverage detected