MCPcopy Index your code
hub / github.com/ampproject/amphtml / onKeyboardStateChanged

Method onKeyboardStateChanged

src/input.js:153–158  ·  view source on GitHub ↗

* Registers an event handle for changes in the keyboard input. * @param {function(boolean)} handler * @param {boolean=} opt_fireImmediately * @return {!UnlistenDef}

(handler, opt_fireImmediately)

Source from the content-addressed store, hash-verified

151 * @return {!UnlistenDef}
152 */
153 onKeyboardStateChanged(handler, opt_fireImmediately) {
154 if (opt_fireImmediately) {
155 handler(this.isKeyboardActive());
156 }
157 return this.keyboardStateObservable_.add(handler);
158 }
159
160 /**
161 * @param {!./service/ampdoc-impl.AmpDoc} ampdoc

Callers 2

setupInputModeClassesMethod · 0.95
test-input.jsFile · 0.80

Calls 3

isKeyboardActiveMethod · 0.95
handlerFunction · 0.50
addMethod · 0.45

Tested by

no test coverage detected