Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var testLibrary = (function() {
  2.     var testLibrary = {
  3.         constructor: function() {
  4.             console.log('test');
  5.         }
  6.     }
  7.    
  8.     window.testLibrary = testLibrary;
  9.     return testLibrary.constructor;
  10. })();
  11.  
  12. testLibrary(); // I want testLibrary.constructor to be called when I do this.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement