Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function init() {
- 'use strict';
- let can = document.getElementById('canvas');
- let ctx = canvas.getContext('2d');
- resizeBlock(can, 50, 50);
- setCSS1('can', 'borderWidth', '20px');// function not working
- setCSS2('can', 'borderWidth', '20px');// also true function not working
- }
- function setCSS1(element, rule, value) {
- element.style.rule = value;
- return element; // should element return or not?
- }
- function setCSS2(element, rule, value) {
- element.style.rule = value;
- return element; // should element return or not?
- }
- window.onload = init;
- function init() { ...snip... }
- window.onload = init;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement