Skip to content

Commit 07b0088

Browse files
authored
chore: remove unused create_element helper (#12283)
1 parent e5d70c3 commit 07b0088

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

packages/svelte/src/internal/client/dom/operations.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,3 @@ export function sibling(node, is_text = false) {
142142
export function clear_text_content(node) {
143143
node.textContent = '';
144144
}
145-
146-
/** @param {string} name */
147-
/*#__NO_SIDE_EFFECTS__*/
148-
export function create_element(name) {
149-
return document.createElement(name);
150-
}

packages/svelte/src/internal/client/render.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { DEV } from 'esm-env';
2-
import { clear_text_content, create_element, empty, init_operations } from './dom/operations.js';
2+
import { clear_text_content, empty, init_operations } from './dom/operations.js';
33
import { HYDRATION_ERROR, HYDRATION_START, PassiveDelegatedEvents } from '../../constants.js';
4-
import { flush_sync, push, pop, current_component_context, current_effect } from './runtime.js';
4+
import { flush_sync, push, pop, current_component_context } from './runtime.js';
55
import { effect_root, branch } from './reactivity/effects.js';
66
import {
77
hydrate_anchor,
88
hydrate_nodes,
9-
hydrating,
109
set_hydrate_nodes,
1110
set_hydrating
1211
} from './dom/hydration.js';
@@ -304,7 +303,7 @@ export async function append_styles(target, style_sheet_id, styles) {
304303
await Promise.resolve();
305304
const append_styles_to = get_root_for_style(target);
306305
if (!append_styles_to.getElementById(style_sheet_id)) {
307-
const style = create_element('style');
306+
const style = document.createElement('style');
308307
style.id = style_sheet_id;
309308
style.textContent = styles;
310309
const target = /** @type {Document} */ (append_styles_to).head || append_styles_to;

0 commit comments

Comments
 (0)