Skip to content

Commit 0a9ba93

Browse files
authored
minor aesthetic tweaks (#10692)
Co-authored-by: Rich Harris <[email protected]>
1 parent ee04f97 commit 0a9ba93

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/svelte/src/compiler/phases/3-transform/client/visitors/template.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ function serialize_element_attribute_update_assignment(element, node_id, attribu
493493
let grouped_value = value;
494494

495495
if (name === 'autofocus') {
496-
state.init.push(b.stmt(b.call('$.auto_focus', node_id, value)));
496+
state.init.push(b.stmt(b.call('$.autofocus', node_id, value)));
497497
return false;
498498
}
499499

@@ -992,7 +992,7 @@ function serialize_inline_component(node, component_name, context) {
992992
const prev = fn;
993993
fn = (node_id) =>
994994
b.call(
995-
'$.cssProps',
995+
'$.css_props',
996996
node_id,
997997
// TODO would be great to do this at runtime instead. Svelte 4 also can't handle cases today
998998
// where it's not statically determinable whether the component is used in a svg or html context

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ export function text(dom, value) {
490490
* @param {boolean} value
491491
* @returns {void}
492492
*/
493-
export function auto_focus(dom, value) {
493+
export function autofocus(dom, value) {
494494
if (value) {
495495
const body = document.body;
496496
dom.autofocus = true;
@@ -1792,7 +1792,7 @@ export function component(anchor_node, component_fn, render_fn) {
17921792
* @param {(anchor: Element | Text | Comment) => any} component
17931793
* @returns {void}
17941794
*/
1795-
export function cssProps(anchor, is_html, props, component) {
1795+
export function css_props(anchor, is_html, props, component) {
17961796
hydrate_block_anchor(anchor);
17971797

17981798
/** @type {HTMLElement | SVGElement} */
@@ -2276,7 +2276,7 @@ export function spread_attributes(dom, prev, attrs, lowercase_attributes, css_ha
22762276
} else if (key === 'style') {
22772277
dom.style.cssText = value + '';
22782278
} else if (key === 'autofocus') {
2279-
auto_focus(/** @type {HTMLElement} */ (dom), Boolean(value));
2279+
autofocus(/** @type {HTMLElement} */ (dom), Boolean(value));
22802280
} else if (key === '__value' || key === 'value') {
22812281
// @ts-ignore
22822282
dom.value = dom[key] = dom.__value = value;

0 commit comments

Comments
 (0)