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

Method onMouseDetected

src/input.js:132–137  ·  view source on GitHub ↗

* Registers an event handle in case if the mouse is detected. * @param {function(boolean)} handler * @param {boolean=} opt_fireImmediately * @return {!UnlistenDef}

(handler, opt_fireImmediately)

Source from the content-addressed store, hash-verified

130 * @return {!UnlistenDef}
131 */
132 onMouseDetected(handler, opt_fireImmediately) {
133 if (opt_fireImmediately) {
134 handler(this.isMouseDetected());
135 }
136 return this.mouseDetectedObservable_.add(handler);
137 }
138
139 /**
140 * Whether the keyboard input is currently active.

Callers 4

setupInputModeClassesMethod · 0.95
test-input.jsFile · 0.80
buildCallbackMethod · 0.80
setupBehaviors_Method · 0.80

Calls 3

isMouseDetectedMethod · 0.95
handlerFunction · 0.50
addMethod · 0.45

Tested by

no test coverage detected