Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var popup = {
  2.     init: function()
  3.     {
  4.         this.element = somelib.createElement('div');
  5.         // ...
  6.         this.element.addEventListener('click', function()
  7.         {
  8.             this.hide();
  9.         }.bind(this));
  10.     },
  11.     show: function(){},
  12.     hide: function(){}
  13. };
  14.  
  15. popup.init();
  16.  
  17. var superPopup = somelib.extend(popup, {
  18.     hide: function()
  19.     {
  20.         // ...
  21.     }
  22. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement