ladybird/Tests/LibWeb/Text/input/DOM/removeAttribute-style.html
Callum Law 610ad25555 LibWeb: Update m_inline_style when element style attribute is removed
Previously we would just throw it away and construct a new (empty) one
when required. This doesn't work as any existing references to the old
instance will contain out of date information. Now we retain and update
the existing instance instead.
2025-06-09 12:06:44 +01:00

12 lines
359 B
HTML

<!DOCTYPE html>
<script src="../include.js"></script>
<script>
test(() => {
const el = document.createElement("div");
const style = el.style;
el.setAttribute("style", "color: red;");
println(`Before: "${style.cssText}"`);
el.removeAttribute("style");
println(`After: "${style.cssText}"`);
});
</script>