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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
{
"classes": {
"View": {
"name": "View",
"superClass": "jQuery",
"filename": "src/space-pen.coffee",
"srcUrl": "https://github.com/atom/space-pen/blob/v5.1.1/src/space-pen.coffee#L75",
"sections": [],
"classMethods": [
{
"name": "subview",
"sectionName": null,
"srcUrl": "https://github.com/atom/space-pen/blob/v5.1.1/src/space-pen.coffee#L85",
"visibility": "Public",
"summary": "Add the given subview wired to an outlet with the given name",
"description": "Add the given subview wired to an outlet with the given name",
"arguments": [
{
"name": "name",
"description": "{String} name of the subview",
"type": "String",
"isOptional": false
},
{
"name": "view",
"description": "DOM element or jQuery node subview ",
"type": null,
"isOptional": false
}
]
},
{
"name": "text",
"sectionName": null,
"srcUrl": "https://github.com/atom/space-pen/blob/v5.1.1/src/space-pen.coffee#L91",
"visibility": "Public",
"summary": "Add a text node with the given text content",
"description": "Add a text node with the given text content",
"arguments": [
{
"name": "string",
"description": "{String} text contents of the node ",
"type": "String",
"isOptional": false
}
]
},
{
"name": "tag",
"sectionName": null,
"srcUrl": "https://github.com/atom/space-pen/blob/v5.1.1/src/space-pen.coffee#L97",
"visibility": "Public",
"summary": "Add a new tag with the given name",
"description": "Add a new tag with the given name",
"arguments": [
{
"name": "tagName",
"description": "{String} name of the tag like 'li', etc",
"type": "String",
"isOptional": false
},
{
"name": "args...",
"description": "other arguments ",
"type": null,
"isOptional": false
}
]
},
{
"name": "raw",
"sectionName": null,
"srcUrl": "https://github.com/atom/space-pen/blob/v5.1.1/src/space-pen.coffee#L102",
"visibility": "Public",
"summary": "Add new child DOM nodes from the given raw HTML string.",
"description": "Add new child DOM nodes from the given raw HTML string.",
"arguments": [
{
"name": "string",
"description": "{String} HTML content ",
"type": "String",
"isOptional": false
}
]
}
],
"instanceMethods": [
{
"name": "preempt",
"sectionName": null,
"srcUrl": "https://github.com/atom/space-pen/blob/v5.1.1/src/space-pen.coffee#L205",
"visibility": "Public",
"summary": "Preempt events registered with jQuery's `::on`.",
"description": "Preempt events registered with jQuery's `::on`.",
"arguments": [
{
"name": "eventName",
"description": "A event name {String}.",
"type": "String",
"isOptional": false
},
{
"name": "handler",
"description": "A {Function} to execute when the eventName is triggered. ",
"type": "Function",
"isOptional": false
}
]
}
],
"classProperties": [],
"instanceProperties": [],
"visibility": "Public",
"summary": "View class that extends the jQuery prototype.",
"description": "View class that extends the jQuery prototype.\n\nExtending classes must implement a `@content` method.",
"examples": [
{
"description": "",
"lang": "coffee",
"code": "class Spacecraft extends View\n @content: ->\n @div =>\n @h1 'Spacecraft'\n @ol =>\n @li 'Apollo'\n @li 'Soyuz'\n @li 'Space Shuttle'",
"raw": "```coffee\nclass Spacecraft extends View\n @content: ->\n @div =>\n @h1 'Spacecraft'\n @ol =>\n @li 'Apollo'\n @li 'Soyuz'\n @li 'Space Shuttle'\n```"
},
{
"description": "Each view instance will have all the methods from the jQuery prototype\navailable on it.",
"lang": "coffee",
"code": " craft = new Spacecraft()\n craft.find('h1').text() # 'Spacecraft'\n craft.appendTo(document.body) # View is now a child of the <body> tag",
"raw": "```coffee\n craft = new Spacecraft()\n craft.find('h1').text() # 'Spacecraft'\n craft.appendTo(document.body) # View is now a child of the <body> tag\n```"
}
]
}
}
}
|