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

Fix issue #122: windows.setTitle() issue Resolved #132

Closed
wants to merge 1 commit into from

Conversation

ArbajAnsari19
Copy link

The change adds a default parameter value of an empty string (= '' ") to the title parameter.
This means:

  1. If setTitle() is called without parameters, title will default to an empty string
  2. If setTitle("some title") is called with a parameter, it will use the provided value
  3. The function will always send a valid string to the websocket message

The change adds a default parameter value of an empty string (= '') to the title parameter. This means:
If setTitle() is called without parameters, title will default to an empty string
If setTitle("some title") is called with a parameter, it will use the provided value
The function will always send a valid string to the websocket message
This maintains TypeScript type safety while handling the empty parameter case gracefully.
did you understand the problem ?

I apologize for my hasty response. Let me clarify - are you saying that even though the function has a default parameter of empty string (title: string = ''), when the function is called without parameters (setTitle()), it's not actually setting the window title to an empty string?
If that's the case, this might be an implementation issue on the native side (the part that handles the 'window.setTitle' message) rather than in the TypeScript interface.
Could you:
Confirm if this is the issue you're seeing?
Let me know what behavior you observe when calling setTitle() without parameters?
This would help me provide a more accurate solution.
@ArbajAnsari19 ArbajAnsari19 closed this by deleting the head repository Nov 16, 2024
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

Successfully merging this pull request may close these issues.

1 participant