MCPcopy Create free account
hub / github.com/deta/surf / showActiveView

Method showActiveView

app/src/main/viewManager.ts:752–783  ·  view source on GitHub ↗
(id?: string)

Source from the content-addressed store, hash-verified

750 }
751
752 showActiveView(id?: string) {
753 const activeViewId = id || this.activeViewId
754 log.log('[main] webcontentsview-showActiveView: showing active view with id', activeViewId)
755
756 if (!activeViewId) {
757 log.warn('[main] webcontentsview-showActiveView: no active view to show')
758 return
759 }
760
761 const view = this.views.get(activeViewId)
762 if (!view) {
763 log.warn('[main] webcontentsview-activate: no view found with id', id)
764 return false
765 }
766
767 if (!this.activeOverlayViewId || view.isOverlay) {
768 log.log('[main] webcontentsview-activate: activating view with id', activeViewId)
769 return this.activateView(activeViewId)
770 }
771
772 const overlayView = this.views.get(this.activeOverlayViewId)
773 if (!overlayView) {
774 log.warn('[main] webcontentsview-activate: no active overlay view found')
775 return false
776 }
777
778 log.log(
779 '[main] webcontentsview-activate: activating overlay view with id',
780 this.activeOverlayViewId
781 )
782 return this.activateView(activeViewId)
783 }
784
785 hideView(id: string) {
786 log.log('[main] webcontentsview-hide: hiding view with id', id)

Callers 1

attachIPCEventsMethod · 0.95

Calls 4

activateViewMethod · 0.95
logMethod · 0.80
warnMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected