Skip to content
Discussion options

You must be logged in to vote

Sure. You can run javascript as soon as the client has connected:

from nicegui import ui, Client

@ui.page('/')
@ui.page('/{path:path}')
async def index(path: str, client: Client):
    await client.connected()
    await ui.run_javascript(f'document.title = "{path or "nothing"}";', respond=False)

ui.run()

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@tjakobi
Comment options

@falkoschindler
Comment options

Answer selected by rodja
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants