Daniel Schwarz 4 months ago
Actually, the syntax should be:

window.getComputedStyle(elem).backgroundColor;
Dmitrii Pashutskii 4 months ago
WOW 🤯 I didn't know it's possible to get computed style in JS.