/trunk/jsdoc-toolkit/app/test/prototype_oblit_constructor.js

http://jsdoc-toolkit.googlecode.com/ · JavaScript · 24 lines · 15 code · 5 blank · 4 comment · 0 complexity · 1286e68417d4c0763e7a8b33c94d4696 MD5 · raw file

  1. /** @constructor */
  2. function Article() {
  3. }
  4. Article.prototype = {
  5. /** @constructor */
  6. Title: function(title) {
  7. /** the value of the Title instance */
  8. this.title = title;
  9. },
  10. init: function(pages) {
  11. /** the value of the pages of the Article instance */
  12. this.pages = pages;
  13. }
  14. }
  15. f = new Article();
  16. f.init("one two three");
  17. t = new f.Title("my title");
  18. print(f.pages);
  19. print(t.title);