MCPcopy Create free account
hub / github.com/OneNoteDev/WebClipper / invokeTooltip

Function invokeTooltip

src/scripts/extensions/extensionWorkerBase.ts:244–262  ·  view source on GitHub ↗
(tooltipType: TooltipType)

Source from the content-addressed store, hash-verified

242 }
243
244 public invokeTooltip(tooltipType: TooltipType): Promise<boolean> {
245 let tooltipInvokeEvent = new Log.Event.PromiseEvent(Log.Event.Label.InvokeTooltip);
246 tooltipInvokeEvent.setCustomProperty(Log.PropertyName.Custom.TooltipType, TooltipType[tooltipType]);
247
248 return this.registerLocalizedStringsForPageNav().then((successful) => {
249 if (successful) {
250 this.registerTooltipCommunicatorFunctions(tooltipType);
251 return this.invokeTooltipBrowserSpecific(tooltipType).then((wasInvoked) => {
252 this.logger.logEvent(tooltipInvokeEvent);
253 return Promise.resolve(wasInvoked);
254 });
255 } else {
256 tooltipInvokeEvent.setStatus(Log.Status.Failed);
257 tooltipInvokeEvent.setFailureInfo({ error: "getLocalizedStringsForBrowser returned undefined/null" });
258 this.logger.logEvent(tooltipInvokeEvent);
259 return Promise.resolve(false);
260 }
261 });
262 }
263
264 /**
265 * Sets the hook method that will be called when this worker object goes away.

Callers

nothing calls this directly

Calls 5

setStatusMethod · 0.95
setFailureInfoMethod · 0.95
setCustomPropertyMethod · 0.80
logEventMethod · 0.45

Tested by

no test coverage detected