File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
packages/svelte/src/internal/client/dom/elements Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 1- import { teardown } from '../../reactivity/effects.js' ;
1+ import { render_effect } from '../../reactivity/effects.js' ;
22import { hydrating } from '../hydration.js' ;
33import { clear_text_content , get_first_child } from '../operations.js' ;
44import { queue_micro_task } from '../task.js' ;
@@ -62,9 +62,12 @@ export function add_form_reset_listener() {
6262 * @param {string } text
6363 */
6464export function title ( text ) {
65- const previous = document . title ;
66- document . title = text ;
67- teardown ( ( ) => {
68- document . title = previous ;
65+ render_effect ( ( ) => {
66+ const previous = document . title ;
67+ document . title = text ;
68+
69+ return ( ) => {
70+ document . title = previous ;
71+ } ;
6972 } ) ;
7073}
You can’t perform that action at this time.
0 commit comments