xpcomcore-rubygem 0.3.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +14 -0
- data/Rakefile +13 -11
- data/VERSION +1 -1
- data/bin/xpcomcore +7 -0
- data/lib/xpcomcore-rubygem.rb +9 -0
- data/lib/xpcomcore-rubygem/commands.rb +54 -0
- data/lib/xpcomcore-rubygem/commands/generate.rb +23 -0
- data/lib/xpcomcore-rubygem/commands/generate/application.rb +63 -0
- data/lib/xpcomcore-rubygem/commands/generate/jeweler_builder_command.rb +108 -0
- data/lib/xpcomcore-rubygem/commands/generate/library.rb +25 -0
- data/lib/xpcomcore-rubygem/commands/generate/template_helpers.rb +78 -0
- data/lib/xpcomcore-rubygem/commands/launch.rb +129 -0
- data/templates/application/application.ini.erb +12 -0
- data/templates/application/chrome/chrome.manifest.erb +1 -0
- data/templates/application/chrome/content/xul/main_window.xul.erb +6 -0
- data/{extension → templates/application}/components/bootstrapper.js +1 -1
- data/templates/application/defaults/preferences/prefs.js.erb +7 -0
- data/templates/shared/jsdoc_doc_task.erb +7 -0
- data/templates/shared/xultestrunner_test_task.erb +7 -0
- data/xpcomcore-rubygem.gemspec +48 -136
- data/xpcomcore/Rakefile +42 -19
- data/xpcomcore/bootstrapper.js +1 -3
- data/xpcomcore/{VERSION.yml → build_properties.yml} +3 -0
- data/xpcomcore/components/XPCOMCore.js +0 -2
- data/xpcomcore/doc/files.html +10 -10
- data/xpcomcore/doc/index.html +17 -17
- data/xpcomcore/doc/symbols/_global_.html +10 -9
- data/xpcomcore/doc/symbols/{Error.html → error.html} +10 -9
- data/xpcomcore/doc/symbols/{File.html → file.html} +13 -12
- data/xpcomcore/doc/symbols/{File.NoSuchFileError.html → file.nosuchfileerror.html} +13 -12
- data/xpcomcore/doc/symbols/{Kernel.html → kernel.html} +48 -47
- data/xpcomcore/doc/symbols/{LoadError.html → loaderror.html} +13 -12
- data/xpcomcore/doc/symbols/{SelfConceptError.html → selfconcepterror.html} +13 -12
- data/xpcomcore/doc/symbols/{Sys.html → sys.html} +12 -11
- data/xpcomcore/doc/symbols/{XPCBuiltins.html → xpcbuiltins.html} +11 -10
- metadata +61 -135
- data/README.rdoc +0 -18
- data/bin/xpcomcore-firefox +0 -4
- data/bin/xpcomcore-rubygem-install +0 -205
- data/extension/README.txt +0 -1
- data/extension/install.rdf +0 -16
- data/xpcomcore/etc/jsdoc-toolkit/README.txt +0 -186
- data/xpcomcore/etc/jsdoc-toolkit/app/frame.js +0 -33
- data/xpcomcore/etc/jsdoc-toolkit/app/frame/Chain.js +0 -102
- data/xpcomcore/etc/jsdoc-toolkit/app/frame/Dumper.js +0 -144
- data/xpcomcore/etc/jsdoc-toolkit/app/frame/Hash.js +0 -84
- data/xpcomcore/etc/jsdoc-toolkit/app/frame/Link.js +0 -153
- data/xpcomcore/etc/jsdoc-toolkit/app/frame/Namespace.js +0 -10
- data/xpcomcore/etc/jsdoc-toolkit/app/frame/Opt.js +0 -134
- data/xpcomcore/etc/jsdoc-toolkit/app/frame/Reflection.js +0 -26
- data/xpcomcore/etc/jsdoc-toolkit/app/frame/String.js +0 -93
- data/xpcomcore/etc/jsdoc-toolkit/app/frame/Testrun.js +0 -129
- data/xpcomcore/etc/jsdoc-toolkit/app/handlers/FOODOC.js +0 -26
- data/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC.js +0 -26
- data/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/DomReader.js +0 -159
- data/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/XMLDoc.js +0 -16
- data/xpcomcore/etc/jsdoc-toolkit/app/handlers/XMLDOC/XMLParse.js +0 -292
- data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC.js +0 -104
- data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/DocComment.js +0 -200
- data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/DocTag.js +0 -294
- data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/JsDoc.js +0 -126
- data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/JsPlate.js +0 -109
- data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Lang.js +0 -144
- data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Parser.js +0 -145
- data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/PluginManager.js +0 -33
- data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Symbol.js +0 -645
- data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/SymbolSet.js +0 -241
- data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TextStream.js +0 -41
- data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Token.js +0 -18
- data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TokenReader.js +0 -332
- data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/TokenStream.js +0 -133
- data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Util.js +0 -32
- data/xpcomcore/etc/jsdoc-toolkit/app/lib/JSDOC/Walker.js +0 -474
- data/xpcomcore/etc/jsdoc-toolkit/app/main.js +0 -111
- data/xpcomcore/etc/jsdoc-toolkit/app/plugins/commentSrcJson.js +0 -20
- data/xpcomcore/etc/jsdoc-toolkit/app/plugins/frameworkPrototype.js +0 -16
- data/xpcomcore/etc/jsdoc-toolkit/app/plugins/functionCall.js +0 -10
- data/xpcomcore/etc/jsdoc-toolkit/app/plugins/publishSrcHilite.js +0 -62
- data/xpcomcore/etc/jsdoc-toolkit/app/plugins/symbolLink.js +0 -10
- data/xpcomcore/etc/jsdoc-toolkit/app/plugins/tagParamConfig.js +0 -31
- data/xpcomcore/etc/jsdoc-toolkit/app/plugins/tagSynonyms.js +0 -43
- data/xpcomcore/etc/jsdoc-toolkit/app/run.js +0 -348
- data/xpcomcore/etc/jsdoc-toolkit/app/t/TestDoc.js +0 -144
- data/xpcomcore/etc/jsdoc-toolkit/app/t/runner.js +0 -13
- data/xpcomcore/etc/jsdoc-toolkit/app/test.js +0 -325
- data/xpcomcore/etc/jsdoc-toolkit/app/test/addon.js +0 -24
- data/xpcomcore/etc/jsdoc-toolkit/app/test/anon_inner.js +0 -14
- data/xpcomcore/etc/jsdoc-toolkit/app/test/augments.js +0 -31
- data/xpcomcore/etc/jsdoc-toolkit/app/test/augments2.js +0 -26
- data/xpcomcore/etc/jsdoc-toolkit/app/test/borrows.js +0 -46
- data/xpcomcore/etc/jsdoc-toolkit/app/test/borrows2.js +0 -23
- data/xpcomcore/etc/jsdoc-toolkit/app/test/config.js +0 -22
- data/xpcomcore/etc/jsdoc-toolkit/app/test/constructs.js +0 -18
- data/xpcomcore/etc/jsdoc-toolkit/app/test/encoding.js +0 -10
- data/xpcomcore/etc/jsdoc-toolkit/app/test/encoding_other.js +0 -12
- data/xpcomcore/etc/jsdoc-toolkit/app/test/event.js +0 -54
- data/xpcomcore/etc/jsdoc-toolkit/app/test/exports.js +0 -14
- data/xpcomcore/etc/jsdoc-toolkit/app/test/functions_anon.js +0 -39
- data/xpcomcore/etc/jsdoc-toolkit/app/test/functions_nested.js +0 -33
- data/xpcomcore/etc/jsdoc-toolkit/app/test/global.js +0 -13
- data/xpcomcore/etc/jsdoc-toolkit/app/test/globals.js +0 -25
- data/xpcomcore/etc/jsdoc-toolkit/app/test/ignore.js +0 -10
- data/xpcomcore/etc/jsdoc-toolkit/app/test/inner.js +0 -16
- data/xpcomcore/etc/jsdoc-toolkit/app/test/jsdoc_test.js +0 -477
- data/xpcomcore/etc/jsdoc-toolkit/app/test/lend.js +0 -33
- data/xpcomcore/etc/jsdoc-toolkit/app/test/memberof.js +0 -19
- data/xpcomcore/etc/jsdoc-toolkit/app/test/memberof_constructor.js +0 -17
- data/xpcomcore/etc/jsdoc-toolkit/app/test/module.js +0 -17
- data/xpcomcore/etc/jsdoc-toolkit/app/test/name.js +0 -19
- data/xpcomcore/etc/jsdoc-toolkit/app/test/namespace_nested.js +0 -23
- data/xpcomcore/etc/jsdoc-toolkit/app/test/nocode.js +0 -13
- data/xpcomcore/etc/jsdoc-toolkit/app/test/oblit_anon.js +0 -20
- data/xpcomcore/etc/jsdoc-toolkit/app/test/overview.js +0 -20
- data/xpcomcore/etc/jsdoc-toolkit/app/test/param_inline.js +0 -37
- data/xpcomcore/etc/jsdoc-toolkit/app/test/params_optional.js +0 -8
- data/xpcomcore/etc/jsdoc-toolkit/app/test/prototype.js +0 -17
- data/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_nested.js +0 -9
- data/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_oblit.js +0 -13
- data/xpcomcore/etc/jsdoc-toolkit/app/test/prototype_oblit_constructor.js +0 -24
- data/xpcomcore/etc/jsdoc-toolkit/app/test/public.js +0 -10
- data/xpcomcore/etc/jsdoc-toolkit/app/test/scripts/code.js +0 -5
- data/xpcomcore/etc/jsdoc-toolkit/app/test/scripts/notcode.txt +0 -5
- data/xpcomcore/etc/jsdoc-toolkit/app/test/shared.js +0 -42
- data/xpcomcore/etc/jsdoc-toolkit/app/test/shared2.js +0 -2
- data/xpcomcore/etc/jsdoc-toolkit/app/test/shortcuts.js +0 -22
- data/xpcomcore/etc/jsdoc-toolkit/app/test/static_this.js +0 -13
- data/xpcomcore/etc/jsdoc-toolkit/app/test/synonyms.js +0 -31
- data/xpcomcore/etc/jsdoc-toolkit/app/test/tosource.js +0 -23
- data/xpcomcore/etc/jsdoc-toolkit/app/test/variable_redefine.js +0 -14
- data/xpcomcore/etc/jsdoc-toolkit/changes.txt +0 -96
- data/xpcomcore/etc/jsdoc-toolkit/conf/sample.conf +0 -31
- data/xpcomcore/etc/jsdoc-toolkit/java/build.xml +0 -36
- data/xpcomcore/etc/jsdoc-toolkit/java/build_1.4.xml +0 -36
- data/xpcomcore/etc/jsdoc-toolkit/java/classes/js.jar +0 -0
- data/xpcomcore/etc/jsdoc-toolkit/java/src/JsDebugRun.java +0 -21
- data/xpcomcore/etc/jsdoc-toolkit/java/src/JsRun.java +0 -21
- data/xpcomcore/etc/jsdoc-toolkit/jsdebug.jar +0 -0
- data/xpcomcore/etc/jsdoc-toolkit/jsrun.jar +0 -0
- data/xpcomcore/etc/jsdoc-toolkit/jsrun.sh +0 -52
- data/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/allclasses.tmpl +0 -17
- data/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/allfiles.tmpl +0 -56
- data/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/class.tmpl +0 -646
- data/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/index.tmpl +0 -39
- data/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/publish.js +0 -200
- data/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/default.css +0 -162
- data/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/header.html +0 -2
- data/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/static/index.html +0 -19
- data/xpcomcore/etc/jsdoc-toolkit/templates/jsdoc/symbol.tmpl +0 -35
@@ -1,24 +0,0 @@
|
|
1
|
-
String.prototype.reverse = function() {
|
2
|
-
}
|
3
|
-
|
4
|
-
String.prototype.reverse.utf8 = function() {
|
5
|
-
}
|
6
|
-
|
7
|
-
Function.count = function() {
|
8
|
-
}
|
9
|
-
|
10
|
-
/** @memberOf Function */
|
11
|
-
Function.count.reset = function() {
|
12
|
-
}
|
13
|
-
|
14
|
-
/** @memberOf Function */
|
15
|
-
count.getValue = function() {
|
16
|
-
}
|
17
|
-
|
18
|
-
/** @memberOf Function.prototype */
|
19
|
-
getSig = function() {
|
20
|
-
}
|
21
|
-
|
22
|
-
/** @memberOf Function.prototype */
|
23
|
-
Function.prototype.getProps = function() {
|
24
|
-
}
|
@@ -1,31 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
@constructor
|
3
|
-
*/
|
4
|
-
function Layout(p) {
|
5
|
-
this.init = function(p) {
|
6
|
-
}
|
7
|
-
|
8
|
-
this.getId = function() {
|
9
|
-
}
|
10
|
-
|
11
|
-
/** @type Page */
|
12
|
-
this.orientation = "landscape";
|
13
|
-
}
|
14
|
-
|
15
|
-
/**
|
16
|
-
@constructor
|
17
|
-
@augments Layout
|
18
|
-
*/
|
19
|
-
function Page() {
|
20
|
-
this.reset = function(b) {
|
21
|
-
}
|
22
|
-
}
|
23
|
-
|
24
|
-
/**
|
25
|
-
@extends Page
|
26
|
-
@constructor
|
27
|
-
*/
|
28
|
-
function ThreeColumnPage() {
|
29
|
-
this.init = function(resetCode) {
|
30
|
-
}
|
31
|
-
}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
@constructor
|
3
|
-
*/
|
4
|
-
function LibraryItem() {
|
5
|
-
this.reserve = function() {
|
6
|
-
}
|
7
|
-
}
|
8
|
-
|
9
|
-
/**
|
10
|
-
@constructor
|
11
|
-
*/
|
12
|
-
function Junkmail() {
|
13
|
-
this.annoy = function() {
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
/**
|
18
|
-
@inherits Junkmail.prototype.annoy as pester
|
19
|
-
@augments ThreeColumnPage
|
20
|
-
@augments LibraryItem
|
21
|
-
@constructor
|
22
|
-
*/
|
23
|
-
function NewsletterPage() {
|
24
|
-
this.getHeadline = function() {
|
25
|
-
}
|
26
|
-
}
|
@@ -1,46 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
@constructor
|
3
|
-
*/
|
4
|
-
function Layout(p) {
|
5
|
-
/** initilize 1 */
|
6
|
-
this.init = function(p) {
|
7
|
-
}
|
8
|
-
|
9
|
-
/** get the id */
|
10
|
-
this.getId = function() {
|
11
|
-
}
|
12
|
-
|
13
|
-
/** @type string */
|
14
|
-
this.orientation = "landscape";
|
15
|
-
|
16
|
-
function getInnerElements(elementSecretId){
|
17
|
-
}
|
18
|
-
}
|
19
|
-
|
20
|
-
/** A static method. */
|
21
|
-
Layout.units = function() {
|
22
|
-
}
|
23
|
-
|
24
|
-
/**
|
25
|
-
@constructor
|
26
|
-
@borrows Layout#orientation
|
27
|
-
@borrows Layout-getInnerElements
|
28
|
-
@borrows Layout.units
|
29
|
-
*/
|
30
|
-
function Page() {
|
31
|
-
/** reset the page */
|
32
|
-
this.reset = function(b) {
|
33
|
-
}
|
34
|
-
}
|
35
|
-
|
36
|
-
/**
|
37
|
-
@constructor
|
38
|
-
@borrows Layout.prototype.orientation as this.orientation
|
39
|
-
@borrows Layout.prototype.init as #init
|
40
|
-
@inherits Page.prototype.reset as #reset
|
41
|
-
*/
|
42
|
-
function ThreeColumnPage() {
|
43
|
-
/** initilize 2 */
|
44
|
-
this.init = function(p) {
|
45
|
-
}
|
46
|
-
}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
// testing circular borrows
|
2
|
-
|
3
|
-
/**
|
4
|
-
@class
|
5
|
-
@borrows Bar#zop as this.my_zop
|
6
|
-
*/
|
7
|
-
function Foo() {
|
8
|
-
/** this is a zip. */
|
9
|
-
this.zip = function() {}
|
10
|
-
|
11
|
-
this.my_zop = new Bar().zop;
|
12
|
-
}
|
13
|
-
|
14
|
-
/**
|
15
|
-
@class
|
16
|
-
@borrows Foo#zip as this.my_zip
|
17
|
-
*/
|
18
|
-
function Bar() {
|
19
|
-
/** this is a zop. */
|
20
|
-
this.zop = function() {}
|
21
|
-
|
22
|
-
this.my_zip = new Foo().zip;
|
23
|
-
}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @constructor
|
3
|
-
* @param person The person.
|
4
|
-
* @param {string} person.name The person's name.
|
5
|
-
* @config {integer} age The person's age.
|
6
|
-
* @config [id=1] Optional id number to use.
|
7
|
-
* @param connection
|
8
|
-
*/
|
9
|
-
function Contact(person, connection) {
|
10
|
-
|
11
|
-
}
|
12
|
-
|
13
|
-
/**
|
14
|
-
* @constructor
|
15
|
-
* @param persons
|
16
|
-
* @config {string} Father The paternal person.
|
17
|
-
* @config {string} Mother The maternal person.
|
18
|
-
* @config {string[]} Children And the rest.
|
19
|
-
*/
|
20
|
-
function Family(/**Object*/persons) {
|
21
|
-
|
22
|
-
}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
var Person = makeClass(
|
2
|
-
/**
|
3
|
-
@scope Person
|
4
|
-
*/
|
5
|
-
{
|
6
|
-
/**
|
7
|
-
This is just another way to define a constructor.
|
8
|
-
@constructs
|
9
|
-
@param {string} name The name of the person.
|
10
|
-
*/
|
11
|
-
initialize: function(name) {
|
12
|
-
this.name = name;
|
13
|
-
},
|
14
|
-
say: function(message) {
|
15
|
-
return this.name + " says: " + message;
|
16
|
-
}
|
17
|
-
}
|
18
|
-
);
|
@@ -1,54 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @name Kitchen
|
3
|
-
* @constructor
|
4
|
-
* @fires Bakery#event:donutOrdered
|
5
|
-
*/
|
6
|
-
|
7
|
-
/**
|
8
|
-
* Fired when some cake is eaten.
|
9
|
-
* @name Kitchen#event:cakeEaten
|
10
|
-
* @function
|
11
|
-
* @param {Number} pieces The number of pieces eaten.
|
12
|
-
*/
|
13
|
-
|
14
|
-
/**
|
15
|
-
* Find out if cake was eaten.
|
16
|
-
* @name Kitchen#cakeEaten
|
17
|
-
* @function
|
18
|
-
* @param {Boolean} wasEaten
|
19
|
-
*/
|
20
|
-
|
21
|
-
/**
|
22
|
-
* @name getDesert
|
23
|
-
* @function
|
24
|
-
* @fires Kitchen#event:cakeEaten
|
25
|
-
*/
|
26
|
-
|
27
|
-
/**
|
28
|
-
* @name Bakery
|
29
|
-
* @constructor
|
30
|
-
* @extends Kitchen
|
31
|
-
*/
|
32
|
-
|
33
|
-
/**
|
34
|
-
* Fired when a donut order is made.
|
35
|
-
* @name Bakery#event:donutOrdered
|
36
|
-
* @event
|
37
|
-
* @param {Event} e The event object.
|
38
|
-
* @param {String} [e.topping] Optional sprinkles.
|
39
|
-
*/
|
40
|
-
|
41
|
-
/**
|
42
|
-
* @constructor
|
43
|
-
* @borrows Bakery#event:donutOrdered as this.event:cakeOrdered
|
44
|
-
*/
|
45
|
-
function CakeShop() {
|
46
|
-
}
|
47
|
-
|
48
|
-
/** @event */
|
49
|
-
CakeShop.prototype.icingReady = function(isPink) {
|
50
|
-
}
|
51
|
-
|
52
|
-
/** @event */
|
53
|
-
function amHungry(/**Boolean*/enoughToEatAHorse) {
|
54
|
-
}
|
@@ -1,39 +0,0 @@
|
|
1
|
-
/** an anonymous constructor executed inline */
|
2
|
-
a = new function() {
|
3
|
-
/** a.b*/
|
4
|
-
this.b = 1;
|
5
|
-
/** a.f */
|
6
|
-
this.f = function() {
|
7
|
-
/** a.c */
|
8
|
-
this.c = 2;
|
9
|
-
}
|
10
|
-
}
|
11
|
-
|
12
|
-
|
13
|
-
/**
|
14
|
-
named function executed inline
|
15
|
-
*/
|
16
|
-
bar1 = function Zoola1() {
|
17
|
-
/** property of global */
|
18
|
-
this.g = 1;
|
19
|
-
}();
|
20
|
-
|
21
|
-
/**
|
22
|
-
named constructor executed inline
|
23
|
-
*/
|
24
|
-
bar2 = new function Zoola2() {
|
25
|
-
/** property of bar */
|
26
|
-
this.p = 1;
|
27
|
-
};
|
28
|
-
|
29
|
-
/** module pattern */
|
30
|
-
module = (function () {
|
31
|
-
/** won't appear in documentation */
|
32
|
-
var priv = 1;
|
33
|
-
|
34
|
-
/** @scope module */
|
35
|
-
return {
|
36
|
-
/** will appear as a property of module */
|
37
|
-
pub: 1
|
38
|
-
}
|
39
|
-
})();
|
@@ -1,33 +0,0 @@
|
|
1
|
-
/** @constructor */
|
2
|
-
function Zop() {
|
3
|
-
}
|
4
|
-
|
5
|
-
/**
|
6
|
-
@class
|
7
|
-
*/
|
8
|
-
Foo = function(id) {
|
9
|
-
// this is a bit twisted, but if you call Foo() you will then
|
10
|
-
// modify Foo(). This is kinda, sorta non-insane, because you
|
11
|
-
// would have to call Foo() 100% of the time to use Foo's methods
|
12
|
-
Foo.prototype.methodOne = function(bar) {
|
13
|
-
alert(bar);
|
14
|
-
};
|
15
|
-
|
16
|
-
// same again
|
17
|
-
Foo.prototype.methodTwo = function(bar2) {
|
18
|
-
alert(bar2);
|
19
|
-
};
|
20
|
-
|
21
|
-
// and these are only executed if the enclosing function is actually called
|
22
|
-
// and who knows if that will ever happen?
|
23
|
-
Bar = function(pez) {
|
24
|
-
alert(pez);
|
25
|
-
};
|
26
|
-
Zop.prototype.zap = function(p){
|
27
|
-
alert(p);
|
28
|
-
};
|
29
|
-
|
30
|
-
// but this is only visible inside Foo
|
31
|
-
function inner() {
|
32
|
-
}
|
33
|
-
};
|
@@ -1,25 +0,0 @@
|
|
1
|
-
function example(/**Circle*/a, b) {
|
2
|
-
/** a global defined in function */
|
3
|
-
var number = a;
|
4
|
-
|
5
|
-
var hideNumber = function(){
|
6
|
-
}
|
7
|
-
|
8
|
-
setNumber = function(){
|
9
|
-
}
|
10
|
-
alert('You have chosen: ' + b);
|
11
|
-
}
|
12
|
-
|
13
|
-
function initPage() {
|
14
|
-
var supported = document.createElement && document.getElementsByTagName;
|
15
|
-
if (!supported) return;
|
16
|
-
// start of DOM script
|
17
|
-
var x = document.getElementById('writeroot');
|
18
|
-
// etc.
|
19
|
-
}
|
20
|
-
|
21
|
-
/** an example var */
|
22
|
-
var document = new Document(x, y);
|
23
|
-
|
24
|
-
var getNumber = function(){
|
25
|
-
}
|