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

#122 Issue Fixed : Resolved window.setTitle() update title to be an empty string after the function is called without parameters #133

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/api/storage.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { sendMessage } from '../ws/websocket';

export function setData(key: string, data: string): Promise<void> {
return sendMessage('storage.setData', { key, data });
};
return sendMessage('storage.setData', { key: key.toLowerCase(), data });
}

export function getData(key: string): Promise<string> {
return sendMessage('storage.getData', { key });
};
return sendMessage('storage.getData', { key: key.toLowerCase() });
}

export function getKeys(): Promise<string[]> {
return sendMessage('storage.getKeys');
Expand Down
2 changes: 1 addition & 1 deletion src/api/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const draggableRegions: WeakMap<HTMLElement, {
pointerup: (e: PointerEvent) => void;
}> = new WeakMap();

export function setTitle(title: string): Promise<void> {
export function setTitle(title: string = ''): Promise<void> {
return sendMessage('window.setTitle', { title });
};

Expand Down