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

"Untitled" page title and browser tab #103

Open
gustawlippa opened this issue Feb 10, 2025 · 1 comment
Open

"Untitled" page title and browser tab #103

gustawlippa opened this issue Feb 10, 2025 · 1 comment

Comments

@gustawlippa
Copy link

gustawlippa commented Feb 10, 2025

Hi!
For some reason, when I try to host the game packaged with love.js, after loading is complete, the page title changes to "Untitled", and the browser tab name changes with it. This is just annoying, as I set the title statically in HTML and don't want my game to change it. For some reason, the issue doesn't present itself when testing locally. If it makes a difference, I tested with Firefox.

It is clear, that love.js is capable of changing the page title, as it displays this behaviour in: https://davidobot.net/lovejs/lovejs_spec_c/. Note that changing the game tabs changes the page title. Similarly, a bug I observed is visible in the https://davidobot.net/lovejs/features_c/ example - title "Graphics Features Test (Compat)" is lost when the loading is complete. As I wasn't able to find the source code of these examples, I couldn't investigate the differences myself.

I'd very much appreciate help with this issue, or a pointer towards a solution, perhaps it is a feature, not a bug after all. I'm not a JS programmer, so maybe I'm missing something obvious.

@JRJurman
Copy link

I was curious about this as well, and the spec_c (which I didn't know about before) seems to be from this spec/main.lua file, or at least, something close enough that has the following call to love.window.setTitle call, which appears to set the window title as expected!

https://github.com/Davidobot/love.js/blob/c4f04e185033a7c9fbefa9be3bec88c41a90421b/spec/main.lua#L54C5-L54C25

It's also possible to configure this by creating a conf.lua file and creating a love.config function, see https://love2d.org/wiki/Config_Files

This also appears to set the title as expected.

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

No branches or pull requests

2 participants