Last active
March 16, 2018 05:53
-
-
Save a1exlism/85bc752c8e4e6b63d84e45174db79f5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let body = document.querySelector('body'); | |
let bodyStyle = window.getComputedStyle(body); | |
Object.prototype.toString.call(bodyStyle); | |
// "[object CSSStyleDeclaration]" | |
console.log('body background: ' + bodyStyle.getPropertyValue('background'); | |
body.style.background = '#000'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment