- Using socket.io inside my namespace
- (function() {
- // All Standard SocketIO code
- }).call(MyLibrary);
- MyLibrary.$ = MyLibrary.jQuery = jQuery.noConflict(true);
- MyLibrary.io = window.io; // Assign it to your desired namespace
- delete window.io; // Remove it from the window namespace