PageRenderTime 32ms CodeModel.GetById 23ms app.highlight 6ms RepoModel.GetById 0ms app.codeStats 1ms

/branches/version1.x/test/data/scope.js

http://jsdoc-toolkit.googlecode.com/
JavaScript | 77 lines | 52 code | 14 blank | 11 comment | 0 complexity | 2057747e63f5460a64bc63ce00ac22eb MD5 | raw file
 1var Record = new function() {
 2	var secretRecord = 1;
 3	
 4	function getSecretRecord() {
 5		alert("I am private.");
 6	}
 7	
 8	return /**@scope Record*/ {
 9		public_variable: 2,
10		
11		getRecord: function() {
12			this.Reader = function() {
13			
14			}
15			alert("I am public: "+this.public_variable+", "+secretRecord);
16		}
17	};
18}
19
20var File = function() {
21	return /** @scope File */ {
22		id: 255,
23		
24		getId: function() {
25			alert(this.id);
26		}
27	};
28}()
29
30var Entry = function(subject) {
31	this.subject = subject;
32	this.getSubject = function(subjId) {
33		alert(this.subject);
34	};
35	return this;
36}("abc00");
37
38dojo.declare(
39	"dojo.widget.Widget",
40	null, 
41	/**
42	 * @scope dojo.widget.Widget
43	 */
44	{
45		initializer: function(container, args) {
46			this.children = [];
47			this.extraArgs = {};
48			this.log = function(){
49			};
50		}
51	}
52);
53
54/** extra widgets */
55extra.widget = {
56}
57
58dojo.extend("dojo.widget.Widget",
59	/**
60		@scope dojo.widget.Widget.prototype
61		@scope extra.widget
62	*/
63	{
64	    /**
65	     * Does something.
66	     */
67	    doIt : function (one, two) {
68	    }
69	}
70);
71
72
73
74
75Record.getRecord();
76File.getId();
77Entry.getSubject();