forked from bitovi/documentjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprototype.js
49 lines (49 loc) · 1009 Bytes
/
prototype.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
steal.then(function() {
/**
* @class DocumentJS.types.prototype
* @tag documentation
* @parent DocumentJS.types
* Sets the following functions and attributes to be added to Class or Constructor prototype (instance) functions.
*
* ###Example
*
* @codestart
* $.Controller.extend('Cookbook.Controllers.Recipe',
* /* @Static *|
* {
* onDocument: true
* },
* /* @Prototype *|
* {
* /**
* * When the page loads, gets all recipes to be displayed.
* *|
* load: function(){
* if(!$("#recipe").length)
* $(document.body).append($('<div/>').attr('id','recipe'))
* Cookbook.Models.Recipe.findAll({}, this.callback('list'));
* },
* ...
* @codeend
*/
DocumentJS.Type("prototype",
/*
* @Static
*/
{
/*
* @return {Object} prototype data.
*/
code: function() {
return {
name: "prototype"
}
},
/*
* Possible scopes for @prototype.
*/
parent: /script|class/,
useName: true,
hasChildren: true
})
})