MCPcopy
hub / github.com/philc/vimium / hide

Method hide

pages/vomnibar_page.js:98–107  ·  view source on GitHub ↗
(onHiddenCallback = null)

Source from the content-addressed store, hash-verified

96 // This ensures that the vomnibar is actually hidden before any new tab is created, and avoids
97 // flicker after opening a link in a new tab then returning to the original tab. See #1485.
98 hide(onHiddenCallback = null) {
99 this.onHiddenCallback = onHiddenCallback;
100 this.input.blur();
101 this.reset();
102 // Wait until this iframe's DOM has been rendered before hiding the iframe. This is to prevent
103 // Chrome caching the previous visual state of the vomnibar iframe. See #4708.
104 setTimeout(() => {
105 UIComponentMessenger.postMessage({ name: "hide" });
106 }, 0);
107 }
108
109 onHidden() {
110 this.onHiddenCallback?.();

Callers 5

onKeyEventMethod · 0.95
handleEnterKeyMethod · 0.95
initDomMethod · 0.95
initFunction · 0.45
initFunction · 0.45

Calls 3

resetMethod · 0.95
setTimeoutFunction · 0.85
postMessageMethod · 0.80

Tested by

no test coverage detected