/branches/jsdoc_tk_gui/setup/test/data/scope.js

http://jsdoc-toolkit.googlecode.com/ · JavaScript · 68 lines · 50 code · 11 blank · 7 comment · 0 complexity · e29061d1cc035c8a893242a26aceb6b8 MD5 · raw file

  1. var Record = new function() {
  2. var secretRecord = 1;
  3. function getSecretRecord() {
  4. alert("I am private.");
  5. }
  6. return /**@scope Record*/ {
  7. public_variable: 2,
  8. getRecord: function() {
  9. this.Reader = function() {
  10. }
  11. alert("I am public: "+this.public_variable+", "+secretRecord);
  12. }
  13. };
  14. }
  15. var File = function() {
  16. return /** @scope File */ {
  17. id: 255,
  18. getId: function() {
  19. alert(this.id);
  20. }
  21. };
  22. }()
  23. var Entry = function(subject) {
  24. this.subject = subject;
  25. this.getSubject = function(subjId) {
  26. alert(this.subject);
  27. };
  28. return this;
  29. }("abc00");
  30. dojo.declare(
  31. "dojo.widget.Widget",
  32. null,
  33. /**
  34. * @scope dojo.widget.Widget
  35. */
  36. {
  37. initializer: function(container, args) {
  38. this.children = [];
  39. this.extraArgs = {};
  40. this.log = function(){
  41. };
  42. }
  43. }
  44. );
  45. dojo.extend("dojo.widget.Widget",
  46. /** @scope dojo.widget.Widget.prototype */
  47. {
  48. /**
  49. * Does something.
  50. */
  51. doIt : function (one, two) {
  52. }
  53. }
  54. );
  55. Record.getRecord();
  56. File.getId();
  57. Entry.getSubject();