Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Question: Is it possible to create a new window in pyfladesk? #11

Open
pythonios opened this issue Apr 15, 2018 · 1 comment
Open

Question: Is it possible to create a new window in pyfladesk? #11

pythonios opened this issue Apr 15, 2018 · 1 comment

Comments

@pythonios
Copy link

I would like to open up a new window if for example a certain link or button is clicked. The new window should render a template for example. Is this possible?

I tried to implement it manually but unfortunately did not succeed.

thanks in advance

@ELC
Copy link
Collaborator

ELC commented Apr 16, 2018

Rendering custom templates is a Routing thing, it has nothing to do with PyFladesk. In the following code will just open new windows when opening external links but this windows will be a system default browser.

In case you want to open a new window for an internal link you should think how to do it.

The objective is to keep the code as clean as possible so there are no plans for multiple windows support.

In case you want to add this feature I suggest:

  • Create a pattern or a way to identify which links should be open in a new window (you could just change something in the domain name, although it seems hacky)
  • Add the code in the init.py to handle such behaviour, you should work on the acceptNavigationRequest method

This library could help: TLDExtract

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants