|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import { teardown } from '../../reactivity/effects.js';
|
|
|
|
|
import { render_effect } from '../../reactivity/effects.js';
|
|
|
|
|
import { hydrating } from '../hydration.js';
|
|
|
|
|
import { clear_text_content, get_first_child } from '../operations.js';
|
|
|
|
|
import { queue_micro_task } from '../task.js';
|
|
|
|
@ -62,9 +62,12 @@ export function add_form_reset_listener() {
|
|
|
|
|
* @param {string} text
|
|
|
|
|
*/
|
|
|
|
|
export function title(text) {
|
|
|
|
|
const previous = document.title;
|
|
|
|
|
document.title = text;
|
|
|
|
|
teardown(() => {
|
|
|
|
|
document.title = previous;
|
|
|
|
|
render_effect(() => {
|
|
|
|
|
const previous = document.title;
|
|
|
|
|
document.title = text;
|
|
|
|
|
|
|
|
|
|
return () => {
|
|
|
|
|
document.title = previous;
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|