'How to open a new PWA window from inside the PWA?
I'm trying to open a new window of my PWA application inside of it. But when I click on the anchor a new chrome tab is open.
Anyone can help me to open two instances of my PWA application?
An example of it is outlook, where you can open a new window of the application to write your email.
Thanks
Solution 1:[1]
The solution was very easy, I just need to open the new window using the window.open
, and not using the anchor tag (A).
Documentation about this function:
https://developer.mozilla.org/pt-PT/docs/Web/API/Window/open
For this to work, you have to pass width
and height
attributes, I couldn't find any documentation for that requirement, but it just works, example:
window.open('https://my.app.domain/route.to/something', null, 'width=600,height=400');
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | luiscla27 |