views:

55

answers:

1

I have private function createSomething():

function Player(id) {

  /**
   *  Creates stuff
   *  @private
   */
  this.createSomething = function() {
    // do something good
  };
}

and i want to see renamed function "createSomething()" after compiling source by Google Closure Compiler. Yes i know about ADVANCED_OPTIMIZATIONS but it does not compatible with jQuery and other libriries.

A: 

Just use without this

function Player(id) {

  /**
   *  Creates stuff
   *  @private
   */
  createSomething = function() {
    // do something good
  };
}
Vlad