We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6966c5b + 552f19b commit 99911c3Copy full SHA for 99911c3
src/runtime/internal/dom.ts
@@ -86,7 +86,7 @@ export function self(fn) {
86
87
export function attr(node: Element, attribute: string, value?: string) {
88
if (value == null) node.removeAttribute(attribute);
89
- else node.setAttribute(attribute, value);
+ else if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value);
90
}
91
92
export function set_attributes(node: Element & ElementCSSInlineStyle, attributes: { [x: string]: string }) {
0 commit comments