2

I'm working on a PWA. This is a three-part question.

  1. For Desktops, I want to open content in a new app window (non-browser) once the app is installed. Any ideas?

  2. If I can open a new app window, then how do I make it part of the same process and share data with it?

  3. Alternatively, if I can't make it part of the same process, then how do I input data to the new window?

wooldridgetm
  • 2,500
  • 1
  • 16
  • 22

1 Answers1

1

Here is a function I used in solving that

function openSame(link) {
    var s=600, 
    l=480, 
    h=window.innerWidth/2-s/2+window.screenX, 
    u=window.innerHeight/2-l/2+window.screenY, 
    g="scrollbars=no, width="+s+", height="+l+", top="+u+", left="+h, 
    n=window.open(link, "", g);
}

// Call the function passing a link
openSame('https://stackoverflow.com')
Emmanuel
  • 407
  • 3
  • 13