Permalink
Browse files

Merge branch 'master' into eventHandlerImmutable

  • Loading branch information...
2 parents c2dbfcd + a8b720f commit 160bf0da4488d21eae67a51cec2cd9520c75447b Mark Bessey committed Sep 20, 2012
Showing with 2,299 additions and 28,491 deletions.
  1. +10 −0 CONTRIBUTING md
  2. +14 −11 README.md
  3. +5 −2 loader.js
  4. +1 −1 package.json
  5. +10 −1 samples/AjaxSample.js
  6. +14 −4 samples/ScrollerSample.js
  7. +13 −10 source/ajax/Ajax.js
  8. +11 −1 source/ajax/AjaxProperties.js
  9. +12 −8 source/ajax/Async.js
  10. +9 −8 source/ajax/Jsonp.js
  11. +21 −2 source/ajax/WebService.js
  12. +28 −5 source/ajax/xhr.js
  13. +64 −3 source/boot/boot.js
  14. +108 −52 source/dom/Control.js
  15. +37 −3 source/dom/dispatcher.js
  16. +56 −0 source/dom/dom.js
  17. +16 −10 source/dom/gesture.js
  18. +8 −1 source/dom/platform.js
  19. +61 −29 source/kernel/Component.js
  20. +1 −1 source/kernel/Layout.js
  21. +4 −1 source/kernel/Object.js
  22. +35 −3 source/kernel/Oop.js
  23. +2 −1 source/kernel/Signals.js
  24. +21 −7 source/kernel/UiComponent.js
  25. +18 −13 source/touch/ScrollMath.js
  26. +7 −4 source/touch/ScrollStrategy.js
  27. +53 −18 source/touch/Scroller.js
  28. +11 −6 source/touch/TouchScrollStrategy.js
  29. +18 −11 source/touch/TranslateScrollStrategy.js
  30. +8 −1 source/touch/touch.js
  31. +6 −2 source/ui/Animator.js
  32. +2 −0 source/ui/BaseLayout.js
  33. +8 −2 source/ui/Button.js
  34. +3 −2 source/ui/Checkbox.js
  35. +15 −1 source/ui/DragAvatar.js
  36. +4 −2 source/ui/Group.js
  37. +1 −0 source/ui/GroupItem.js
  38. +8 −6 source/ui/Image.js
  39. +17 −13 source/ui/Input.js
  40. +27 −13 source/ui/Popup.js
  41. +10 −4 source/ui/Repeater.js
  42. +19 −11 source/ui/RichText.js
  43. +6 −5 source/ui/Select.js
  44. +27 −13 source/ui/Selection.js
  45. +6 −2 source/ui/TextArea.js
  46. +3 −1 source/ui/ToolDecorator.js
  47. +54 −61 tools/minifier/minify.js
  48. +1 −0 tools/minifier/node_modules/.bin/nopt
  49. 0 tools/minifier/node_modules/nopt/.npmignore
  50. +23 −0 tools/minifier/node_modules/nopt/LICENSE
  51. +210 −0 tools/minifier/node_modules/nopt/README.md
  52. +44 −0 tools/minifier/node_modules/nopt/bin/nopt.js
  53. +30 −0 tools/minifier/node_modules/nopt/examples/my-program.js
  54. +555 −0 tools/minifier/node_modules/nopt/lib/nopt.js
  55. +23 −0 tools/minifier/node_modules/nopt/node_modules/abbrev/README.md
  56. +106 −0 tools/minifier/node_modules/nopt/node_modules/abbrev/lib/abbrev.js
  57. +20 −0 tools/minifier/node_modules/nopt/node_modules/abbrev/package.json
  58. +31 −0 tools/minifier/node_modules/nopt/package.json
  59. +3 −1 tools/minifier/node_modules/uglify-js/.npmignore
  60. +9 −6 tools/minifier/node_modules/uglify-js/bin/uglifyjs
  61. +1 −1,380 tools/minifier/node_modules/uglify-js/lib/consolidator.js
  62. +0 −75 tools/minifier/node_modules/uglify-js/lib/object-ast.js
  63. +37 −19 tools/minifier/node_modules/uglify-js/lib/parse-js.js
  64. +96 −16 tools/minifier/node_modules/uglify-js/lib/process.js
  65. +1 −0 tools/minifier/node_modules/uglify-js/lib/squeeze-more.js
  66. +9 −16 tools/minifier/node_modules/uglify-js/package.json
  67. +7 −1 tools/minifier/node_modules/uglify-js/test/testparser.js
  68. +1 −1 tools/minifier/node_modules/uglify-js/test/unit/compress/expected/issue14.js
  69. +3 −1 tools/minifier/node_modules/uglify-js/test/unit/scripts.js
  70. +0 −13 tools/minifier/node_modules/uglify-js/tmp/269.js
  71. +0 −22,315 tools/minifier/node_modules/uglify-js/tmp/app.js
  72. +0 −15 tools/minifier/node_modules/uglify-js/tmp/embed-tokens.js
  73. +0 −26 tools/minifier/node_modules/uglify-js/tmp/goto.js
  74. +0 −8 tools/minifier/node_modules/uglify-js/tmp/goto2.js
  75. +0 −138 tools/minifier/node_modules/uglify-js/tmp/instrument2.js
  76. +0 −8 tools/minifier/node_modules/uglify-js/tmp/liftvars.js
  77. +0 −3,930 tools/minifier/node_modules/uglify-js/tmp/uglify-hangs.js
  78. +0 −166 tools/minifier/node_modules/uglify-js/tmp/uglify-hangs2.js
  79. +135 −0 tools/minifier/path-relative-shim.js
  80. +28 −0 tools/test/core/tests/ComponentTest.js
  81. +33 −1 tools/test/core/tests/KindTest.js
  82. +1 −0 tools/test/core/tests/package.js
View
@@ -0,0 +1,10 @@
+# Contributions
+
+Contributions are welcome for Enyo and its associated libraries including onyx and layout.
+
+Please see [Contributing to Enyo](http://enyojs.com/community/contribute/) for details
+on our contribution policy and guidelines for use of the Enyo-DCO-1.0-Signed-off-by
+line in your commits and pull requests.
+
+If you're interested in introducing new kinds, you might also consider hosting your own repo
+and contributing to the [Enyo community gallery](http://enyojs.com/gallery).
View
@@ -25,13 +25,13 @@ Enyo up to 1.x was the underlying framework used to develop applications for HP'
Enyo was designed from the beginning to be highly extensible. This repository reflects a small working set of code, that can be expanded with any number of libraries or plugins.
-Enyo 2 is lightweight (at the time of this writing, roughly 13k gzipped), easy to digest, and powerful.
+Enyo 2 is lightweight, easy to digest, and powerful.
# What Do I Get
-The core code includes the Enyo kernel, the DOM extensions, and some Ajax (XHR) tools. These things are actually separable (it's easy to make micro-builds of Enyo), but we believe this is a useful working set.
+The core code includes the Enyo kernel, the DOM extensions, some Ajax (XHR) tools, and basic wrapper kinds for a lot of DOM form elements. These things are actually separable (it's easy to make micro-builds of Enyo), but we believe this is a useful working set.
-The Enyo 2 kernel provides a modularity concept (Component) and a view concept (UiComponent). The DOM aspect includes a widget concept (Control) and an extensible event system (Dispatcher). The Ajax package includes basic xhr functionality and an implementation of xhr as a Component (Ajax).
+The Enyo 2 kernel provides a modularity concept (Component) and a view concept (UiComponent). The DOM aspect includes a widget concept (Control) and an extensible event system (Dispatcher). The Ajax package includes basic xhr functionality and an implementation of xhr as a Component (Ajax). The touch package provides platform-optimized scrollers, while the UI package provides base kinds for common controls like buttons and popups.
Just these pieces are sufficient to create large applications using the Enyo encapsulation model. Developers that want only this low-level code are encouraged to roll-their-own. For those that want a richer set of tools, there are some pre-built libraries already available, and much more on the way.
@@ -66,10 +66,11 @@ Here is an Enyo Hello World:
<head>
<title>Enyo</title>
<script src="enyojs/2.0/enyo.js" type="text/javascript"></script>
+ <link href="enyojs/2.0/enyo.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script type="text/javascript">
- new enyo.Control({content: "Hello From Enyo"}).write();
+ new enyo.Control({content: "Hello From Enyo"}).renderInto(document.body);
</script>
</body>
</html>
@@ -78,7 +79,8 @@ This example loads an enyo.js build from _enyojs/2.0/_. If you downloaded the SD
The base enyo.Control works much like an HTML tag. You can assign _classes_ and _attributes_ and give it a _style_. E.g.
- new enyo.Control({content: "Hello From Enyo", classes: "foo", style: "color: red", attributes: {tabIndex: 0}}).write();
+ new enyo.Control({content: "Hello From Enyo", classes: "foo", style: "color: red",
+ attributes: {tabIndex: 0}}).renderInto(document.body);
produces
@@ -91,7 +93,7 @@ Now, the good parts start when you combine more than one Control, e.g.
{content: "Hello From Enyo"},
{tag: "hr"}
]
- }).write();
+ }).renderInto(document.body);
This Control now encapsulates two Controls into one scope (we can encapsulate any type of Component, that's why the property is called _components_. Controls are one kind of Component.) The outer Control is responsible for the encapsulated components: it manages their lifecycle, listens to their messages, and maintains references to them. For example:
@@ -103,9 +105,9 @@ This Control now encapsulates two Controls into one scope (we can encapsulate an
helloTap: function() {
this.$.hello.addStyles("color: red");
}
- }).write();
+ }).renderInto(document.body);
-Here we've given one of the components a name ('hello') and told it to send a 'helloTap' message when it's tapped (tap is basically the same as the DOM click event, but it works in both mouse and touch environments). The _$_ property is a hash that references all the sub-components (we don't store these references directly on _this_ to avoid name conflicts). Btw, notice there is no add/remove machinery to listen to this event, that's all taken care of.
+Here we've given one of the components a name ('hello') and told it to send a 'helloTap' message when it's tapped (tap is basically the same as the DOM click event, but it works in both mouse and touch environments). The '$' property is a hash that references all the sub-components (we don't store these references directly on _this_ to avoid name conflicts). Notice there is no add/remove machinery to listen to this event, that's all taken care of.
The main point is that 'hello' and the 'hr', their references and behavior, are completely contained inside the outer control. Now, to re-use this, we need to make it a prototype.
@@ -123,9 +125,10 @@ Enyo contains a constructor/prototype-generator that we call enyo.kind. Construc
}
});
// make two, they're small
- new Hello().write();
- new Hello().write();
+ new enyo.Control({
+ component: [ {kind: "Hello"}, {kind: "Hello"} ]
+ }).renderInto(document.body);
The code above creates a new kind called "Hello" derived from enyo.Control. It contains some components and some behavior. I can create as many "Hello" objects as I want, each instance is independent, and the user of a "Hello" doesn't need to know anything about its internals.
-This ability to define encapsulated objects and behavior (Components) and to re-use those encapsulations as prototypes (kinds) is money.
+This ability to define encapsulated objects and behavior (Components) and to re-use those encapsulations as prototypes (kinds) is money.
View
@@ -102,6 +102,9 @@
finish: function() {
this.packageFolder = "";
this.verbose && console.log("-------------- fini");
+ if (this.finishCallback) {
+ this.finishCallback();
+ }
},
continueBlock: function(inBlock) {
while (inBlock.index < inBlock.depends.length) {
@@ -129,10 +132,10 @@
// assemble path
path = prefix + path;
// process path
- if (path.slice(-3) == "css") {
+ if (path.slice(-4) == ".css") {
this.verbose && console.log("+ stylesheet: [" + prefix + "][" + inPath + "]");
this.requireStylesheet(path);
- } else if (path.slice(-2) == "js" && path.slice(-10) != "package.js") {
+ } else if (path.slice(-3) == ".js" && path.slice(-10) != "package.js") {
this.verbose && console.log("+ module: [" + prefix + "][" + inPath + "]");
this.requireScript(inPath, path);
} else {
View
@@ -12,7 +12,7 @@
"licenses": [{
"type": "Apache-2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0"
}],
- "bugs": "https://github.com/enyojs/enyo/issues/",
+ "bugs": "https://enyojs.atlassian.net/",
"repositories": [{
"type": "git", "url": "http://github.com/enyojs/enyo"
}]
View
@@ -8,21 +8,30 @@ enyo.kind({
{kind: "onyx.Input", name:"query", fit:true, value:'select * from upcoming.events where woeid in (select woeid from geo.places where text="Sunnyvale, CA")'},
{kind: "onyx.Button", content:"Fetch", ontap:"fetch"}
]},
+ {kind: "FittableColumns", classes:"onyx-toolbar-inline", components: [
+ {content: "URL: "},
+ {kind: "onyx.Input", name:"baseUrl", fit:true, value:'http://query.yahooapis.com/v1/public/yql?format=json'}
+ ]},
{kind: "onyx.TextArea", fit:true, classes:"ajax-sample-source"}
],
fetch: function() {
var ajax = new enyo.Ajax({
- url: "http://query.yahooapis.com/v1/public/yql?format=json"
+ url: this.$.baseUrl.getValue()
});
// send parameters the remote service using the 'go()' method
ajax.go({
q: this.$.query.getValue()
});
// attach responders to the transaction object
ajax.response(this, "processResponse");
+ // handle error
+ ajax.error(this, "processError");
},
processResponse: function(inSender, inResponse) {
// do something with it
this.$.textArea.setValue(JSON.stringify(inResponse, null, 2));
+ },
+ processError: function(inSender, inResponse) {
+ alert("Error!");
}
});
View
@@ -1,7 +1,7 @@
enyo.kind({
name: "enyo.sample.ScrollerSample",
kind: "FittableRows",
- classes: "enyo-fit",
+ classes: "enyo-fit enyo-unselectable",
components: [
{kind: "onyx.Toolbar", components: [
{kind: "onyx.PickerDecorator", components: [
@@ -14,15 +14,15 @@ enyo.kind({
]}
]}
]},
- {kind: "Panels", fit:true, classes: "scroller-sample-panels", components: [
+ {kind: "Panels", fit: true, draggable: false, classes: "scroller-sample-panels", components: [
// Default scroller (chooses best scrolling method for platform)
{kind: "Scroller", classes: "scroller-sample-scroller enyo-fit"},
// Forces touch scrolling, even on desktop
{kind: "Scroller", touch:true, classes: "scroller-sample-scroller enyo-fit"},
// Horizontal-only scrolling
{kind: "Scroller", vertical:"hidden", classes: "scroller-sample-scroller enyo-fit"},
// Vertical-only scrolling
- {kind: "Scroller", horizontal:"hidden", classes: "scroller-sample-scroller enyo-fit"}
+ {kind: "Scroller", horizontal:"hidden", classes: "scroller-sample-scroller enyo-fit", onmousedown: "mouseDown", ondragstart: "dragStart"}
]}
],
create: function() {
@@ -39,5 +39,15 @@ enyo.kind({
sampleChanged: function(inSender, inEvent) {
this.$.panels.setIndex(inEvent.selected.indexInContainer()-1);
},
- text: "Foo<br>Bar<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. <br>Foo<br>Bar<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. <br>Foo<br>Bar<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. <br>Foo<br>Bar<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. <br>"
+ text: "Foo<br>Bar<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. <br>Foo<br>Bar<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. <br>Foo<br>Bar<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. <br>Foo<br>Bar<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow<br>Foo<br>Bar<br>Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. Boom boom pow. <br>",
+ // The following are used when this sample is called from the Sampler app
+ mouseDown: function(inSender, inEvent) {
+ inEvent.preventDefault();
+ },
+ dragStart: function(inSender, inEvent) {
+ if (inEvent.horizontal) {
+ // Prevent drag propagation on horizontal drag events
+ return true;
+ }
+ }
});
View
@@ -1,12 +1,12 @@
/**
_enyo.Ajax_ is a wrapper for _XmlHttpRequest_ that uses
the <a href="#enyo.Async">enyo.Async</a> API.
-
+
IMPORTANT: _enyo.Ajax_ publishes all the properties of the
<a href="#enyo.AjaxProperties">enyo.AjaxProperties</a>
object.
- Like _enyo.Async_, _enyo.Ajax_ is an **Object**, not a **Component**.
+ Like _enyo.Async_, _enyo.Ajax_ is an **Object**, not a **Component**.
Do not try to make _enyo.Ajax_ objects inside a _components_ block.
If you want to use _enyo.Ajax_ as a component, you should probably
@@ -16,7 +16,7 @@
getWoeid: function(inPlace) {
// setup <a href="#enyo.AjaxProperties">enyo.AjaxProperties</a> by sending them to the _enyo.Ajax_ constructor
- var x = enyo.Ajax({url: "http://query.yahooapis.com/v1/public/yql?format=json"});
+ var x = new enyo.Ajax({url: "http://query.yahooapis.com/v1/public/yql?format=json"});
// send parameters the remote service using the 'go()' method
x.go({
q: 'select woeid from geo.placefinder where text="' + inPlace + '"'
@@ -54,24 +54,26 @@ enyo.kind({
request: function(inParams) {
var parts = this.url.split("?");
var uri = parts.shift() || "";
- var args = parts.join("?").split("&");
+ var args = parts.length ? (parts.join("?").split("&")) : [];
//
var body = enyo.isString(inParams) ? inParams : enyo.Ajax.objectToQuery(inParams);
if (this.method == "GET") {
if (body) {
args.push(body);
body = null;
}
- if (this.cacheBust) {
+ // don't use cacheBust on file URLs, can cause problems in Android 4
+ if (this.cacheBust && !/^file:/i.test(uri)) {
args.push(Math.random());
}
}
//
- var url = [uri, args.join("&")].join("?");
+ var url = args.length ? [uri, args.join("&")].join("?") : uri;
//
- var xhr_headers = {
- "Content-Type": this.contentType
- };
+ var xhr_headers = {};
+ if (this.method != "GET") {
+ xhr_headers["Content-Type"] = this.contentType;
+ }
enyo.mixin(xhr_headers, this.headers);
//
this.xhr = enyo.xhr.request({
@@ -83,7 +85,8 @@ enyo.kind({
sync: window.PalmSystem ? false : this.sync,
username: this.username,
password: this.password,
- xhrFields: this.xhrFields
+ xhrFields: this.xhrFields,
+ mimeType: this.mimeType
});
},
receive: function(inText, inXhr) {
@@ -1,3 +1,8 @@
+/**
+ Common set of published properties used in both
+ <a href="#enyo.Ajax">enyo.Ajax</a> and
+ <a href="#enyo.WebService">enyo.WebService</a>.
+*/
enyo.AjaxProperties = {
/**
When true, appends a random number as a parameter for GET requests
@@ -46,6 +51,11 @@ enyo.AjaxProperties = {
password: "",
/**
Optional object with fields to pass directly to the underlying XHR object.
+ One example is the _withCredentials_ flag used for cross-origin requests.
*/
- xhrFields: null
+ xhrFields: null,
+ /**
+ Optional string to override the MIME-Type.
+ */
+ mimeType: null
};
View
@@ -13,13 +13,17 @@
More information on _Async_ and its usage is available in the
<a href="https://github.com/enyojs/enyo/wiki/Async">Async documentation</a>
in the Enyo Developer Guide.
-
-
-
*/
enyo.kind({
name: "enyo.Async",
kind: enyo.Object,
+ published: {
+ /**
+ If set to a non-zero value, the number of milliseconds to
+ wait after the _go_ call before failing with the "timeout" error
+ */
+ timeout: 0
+ },
//* @protected
failed: false,
context: null,
@@ -34,7 +38,7 @@ enyo.kind({
//* @public
/**
Registers a response function.
- First parameter is an optional this context for the response method.
+ First parameter is an optional _this_ context for the response method.
Second (or only) parameter is the function object.
*/
response: function(/* [inContext], inResponder */) {
@@ -43,7 +47,7 @@ enyo.kind({
},
/**
Registers an error handler.
- First parameter is an optional this context for the response method.
+ First parameter is an optional _this_ context for the response method.
Second (or only) parameter is the function object.
*/
error: function(/* [inContext], inResponder */) {
@@ -96,7 +100,7 @@ enyo.kind({
this.fail("timeout");
},
//* @protected
- //* Called as part of the async implementation, triggers the handler chain.
+ //* Called as part of the async implementation; triggers the handler chain.
respond: function(inValue) {
this.failed = false;
this.endTimer();
@@ -109,8 +113,8 @@ enyo.kind({
this.endTimer();
this.handle(inError, this.errorHandlers);
},
- //* Called from an error handler, this method clears the error
- // condition and resumes calling handler methods.
+ //* Called from an error handler; clears the error condition and resumes
+ //* calling handler methods.
recover: function() {
this.failed = false;
},
Oops, something went wrong.

0 comments on commit 160bf0d

Please sign in to comment.