MCPcopy
hub / github.com/ai/visibilityjs / fireEvent

Function fireEvent

lib/visibility.fallback.js:21–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19 var event = null
20 var i = 0
21 var fireEvent = function () {
22 if( document.createEvent ) {
23 if ( !event ) {
24 event = document.createEvent('HTMLEvents');
25 event.initEvent('visibilitychange', true, true);
26 }
27 document.dispatchEvent(event);
28 } else {
29 if ( typeof(Visibility) == 'object' ) {
30 Visibility._change.call(Visibility, { });
31 }
32 }
33 }
34
35 var onFocus = function () {
36 document.hidden = false;

Callers 2

onFocusFunction · 0.85
onBlurFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected