mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 03:39:17 +00:00
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.
12 lines
359 B
HTML
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>
|