Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- actions: {
- changeBackground(url) {
- console.log(url) // => file://path/to/image.png
- document.body.style.backgroundImage = `url(${url})`;
- console.log(document.body.style); // CSSStyleDeclaration {..., backgroundImage: "", ...}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement