Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. function init() {
  2. 'use strict';
  3. let can = document.getElementById('canvas');
  4. let ctx = canvas.getContext('2d');
  5. resizeBlock(can, 50, 50);
  6. setCSS1('can', 'borderWidth', '20px');// function not working
  7. setCSS2('can', 'borderWidth', '20px');// also true function not working
  8. }
  9.  
  10. function setCSS1(element, rule, value) {
  11. element.style.rule = value;
  12. return element; // should element return or not?
  13. }
  14.  
  15. function setCSS2(element, rule, value) {
  16. element.style.rule = value;
  17. return element; // should element return or not?
  18. }
  19.  
  20. window.onload = init;
  21.  
  22. function init() { ...snip... }
  23. window.onload = init;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement