daily pastebin goal
75%
SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 71 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. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top