Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_title function #381

Open
ttytm opened this issue May 31, 2024 · 3 comments
Open

set_title function #381

ttytm opened this issue May 31, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@ttytm
Copy link
Member

ttytm commented May 31, 2024

Currently, upon a window start the window title is the localhost path until the windows is full loaded. Then the windows html <title> is used.

Similar to the webui_set_icon function a webui_set_title function could be used to achive setting a consistent window title for a webui application.

@hassandraga
Copy link
Member

If we add webui_set_title then it will behave like this:

  • Web Browser
    • Not connected
      • localhost until page is loaded, then <title>
    • Connected
      • Running JS to change title
  • WebView
    • Not connected
      • webui_set_title until page is loaded, then <title>
    • Connected
      • Running JS to change title

If you don't see any issue in this, then let's add it.

@hassandraga hassandraga added the enhancement New feature or request label May 31, 2024
@ttytm
Copy link
Member Author

ttytm commented May 31, 2024

Since WebUI is about making GUI apps, I think it can be a good think to set a consistent title (/ allow more control over the title) from the backend via an API function that is provided by WebUI.

I think there might be some options/workarounds to fully prevent the localhost, this would then make a webui app feel even more like a native gui app. I didn't made any tests yet though.

@aztack
Copy link

aztack commented Sep 12, 2024

I tried set empty window title with:

<html><head><title></title></head>...

and

document.title = '';

None of the above code works. Window title remains "localhost:xxxx"
But a 'non-empty' string works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants