We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I expect this example to work. That is, when a component is unmounted that contains the following code:
<svelte:head> <title>Title</title> </svelte:head>
it should reset the document.title to the previous value.
This is particularly relevant when using shallow routing, where rendering a page component manually is recommended.
Something like
$.head(($$anchor) => { const previous_title = $.document.title; $.teardown(() => { $.document.title = previous_title; }); $.document.title = `title`; });
I'm not sure whether there would need to be some global queue of titles, i.e.
const title_queue = []; function set_title(title) { render_effect(() => { title_queue.push(document.title); document.title = title; return () => { if (title_queue.length === 0) return; document.title = title_queue.pop(); }; }); }
would make my life easier
The text was updated successfully, but these errors were encountered:
dupe of #7656, will be fixed by #14116
Sorry, something went wrong.
No branches or pull requests
Describe the problem
I expect this example to work. That is, when a component is unmounted that contains the following code:
it should reset the document.title to the previous value.
This is particularly relevant when using shallow routing, where rendering a page component manually is recommended.
Describe the proposed solution
Something like
I'm not sure whether there would need to be some global queue of titles, i.e.
Importance
would make my life easier
The text was updated successfully, but these errors were encountered: