blockless
Rich Harris 10 months ago
parent ba0eed1d53
commit 9db48109df

@ -492,7 +492,7 @@ function serialize_element_attribute_update_assignment(element, node_id, attribu
let grouped_value = value;
if (name === 'autofocus') {
state.init.push(b.stmt(b.call('$.auto_focus', node_id, value)));
state.init.push(b.stmt(b.call('$.autofocus', node_id, value)));
return false;
}

@ -492,7 +492,7 @@ export function text(dom, value) {
* @param {boolean} value
* @returns {void}
*/
export function auto_focus(element, value) {
export function autofocus(element, value) {
if (value) {
element.autofocus = true;
@ -2008,7 +2008,7 @@ export function spread_attributes(dom, prev, attrs, lowercase_attributes, css_ha
} else if (key === 'style') {
dom.style.cssText = value + '';
} else if (key === 'autofocus') {
auto_focus(/** @type {HTMLElement} */ (dom), Boolean(value));
autofocus(/** @type {HTMLElement} */ (dom), Boolean(value));
} else if (key === '__value' || key === 'value') {
// @ts-ignore
dom.value = dom[key] = dom.__value = value;

Loading…
Cancel
Save