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

Method bringViewToFront

app/src/main/viewManager.ts:707–733  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

705 }
706
707 bringViewToFront(id: string) {
708 try {
709 log.log('[main] webcontentsview-bringToFront: bringing view with id', id, 'to front')
710
711 const view = this.views.get(id)
712 if (!view) {
713 log.warn('[main] webcontentsview-bringToFront: no view found with id', id)
714 return false
715 }
716
717 // Remove and re-add to bring to front
718 this.removeChildView(view)
719 this.addChildView(view)
720 log.log('[main] Activated WebContentsView, brought to top for id:', view.id)
721
722 if (view.isOverlay) {
723 this.activeOverlayViewId = view.id
724 } else {
725 this.activeViewId = view.id
726 }
727
728 return true
729 } catch (e) {
730 log.warn('[main] Could not activate WebContentsView', e)
731 return false
732 }
733 }
734
735 activateView(id: string) {
736 log.log('[main] webcontentsview-activate: activating view with id', id)

Callers 3

positionOverlaysMethod · 0.95
activateViewMethod · 0.95
attachIPCEventsMethod · 0.95

Calls 5

removeChildViewMethod · 0.95
addChildViewMethod · 0.95
logMethod · 0.80
warnMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected