Advertisement
Guest User

Untitled

a guest
Dec 13th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var Main = {
  2.     diceBtn: null,
  3.     clockBtn: null,
  4.     wrapper: null,
  5.  
  6.     init: function(event) {
  7.         Main.diceBtn  = document.getElementById("icon-dice");
  8.         Main.clockBtn = document.getElementById("icon-clock");
  9.         Main.wrapper  = document.getElementById("page-content-wrapper");
  10.         Listener.add(Main.diceBtn,"click",Main.newDiceWindow);
  11.     },
  12.  
  13.     newDiceWindow: function(){
  14.         var diceWindow = new DiceApplication;
  15.         Main.wrapper.appendChild(diceWindow.wrapper);
  16.         diceWindow.hello();
  17.         Listener.add(diceWindow.addBtn,"click",diceWindow.add);
  18.         Listener.add(diceWindow.removeBtn,"click",diceWindow.remove);
  19.         Listener.add(diceWindow.rollBtn,"click",diceWindow.roll);
  20.         Listener.add(diceWindow.closeBtn,"click",diceWindow.close);
  21.     }
  22. }
  23.  
  24. Listener.add(window,"load",Main.init);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement