MCPcopy
hub / github.com/ampproject/amphtml / closeSidebar

Method closeSidebar

examples/pwa/pwa.js:178–189  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

176 }
177
178 closeSidebar() {
179 if (this.sidebarCloseButton_) {
180 return new Promise((resolve) => {
181 this.sidebarCloseButton_.click();
182 // TODO implement a better method to detect when
183 // closing sidebar has finished
184 setTimeout(() => resolve(), 100);
185 });
186 } else {
187 return Promise.resolve();
188 }
189 }
190}
191
192class AmpViewer {

Callers 1

handleNavigate_Method · 0.95

Calls 3

resolveMethod · 0.80
resolveFunction · 0.50
clickMethod · 0.45

Tested by

no test coverage detected