Skip to content

Commit

Permalink
Update get-computed-style.js
Browse files Browse the repository at this point in the history
  • Loading branch information
asamuzaK committed Jan 27, 2024
1 parent b65cc8f commit b65cde0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions benchmark/dom/get-computed-style.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ exports["getComputedStyle() on document.body"] = () => {
});
};

exports["getComputedStyle() on element with rgb color"] = () => {
let window, node;

return suite({
setup(doc) {
window = doc.defaultView;
node = doc.createElement("div");
node.style.color = "rgb(128, 0, 128)";
doc.body.appendChild(node);
},
fn() {
window.getComputedStyle(node);
}
});
};

exports["getComputedStyle() on element with non-rgb color"] = () => {
let window, node;

Expand Down

0 comments on commit b65cde0

Please sign in to comment.