tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject [3/8] git commit: Correct some typos Don't bother to cache an ElementWrapper for document.body
Date Wed, 02 Jan 2013 02:15:30 GMT
Correct some typos
Don't bother to cache an ElementWrapper for document.body


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/5fa000d3
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/5fa000d3
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/5fa000d3

Branch: refs/heads/master
Commit: 5fa000d397648d72c2c845cca38913c4d709a4e3
Parents: d8b220c
Author: Howard M. Lewis Ship <hlship@apache.org>
Authored: Tue Jan 1 14:57:02 2013 -0800
Committer: Howard M. Lewis Ship <hlship@apache.org>
Committed: Tue Jan 1 14:57:02 2013 -0800

----------------------------------------------------------------------
 .../apache/tapestry5/t5-core-dom-prototype.coffee  |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/5fa000d3/tapestry-core/src/main/coffeescript/org/apache/tapestry5/t5-core-dom-prototype.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/org/apache/tapestry5/t5-core-dom-prototype.coffee
b/tapestry-core/src/main/coffeescript/org/apache/tapestry5/t5-core-dom-prototype.coffee
index 6e84914..1c34aac 100644
--- a/tapestry-core/src/main/coffeescript/org/apache/tapestry5/t5-core-dom-prototype.coffee
+++ b/tapestry-core/src/main/coffeescript/org/apache/tapestry5/t5-core-dom-prototype.coffee
@@ -13,11 +13,11 @@
 # limitations under the License.
 
 
-# ## t5/core/dom
+# ## t5/core/dom (prototype)
 #
 # This is the abstraction layer that allows the majority of components to operate without
caring whether the
 # underlying infrastructure framework is Prototype, jQuery, or something else.  This implementation
is specific
-# to Prototype, but Tapestry can be adapted to any infrastreucture framework by re-implementing
this module.
+# to Prototype, but Tapestry can be adapted to any infrastructure framework by re-implementing
this module.
 #
 # The abstraction layer has a number of disadvantages:
 #
@@ -29,6 +29,8 @@
 # It is quite concievable that some components will require direct access to the infrastructure
framework, especially
 # those that are wrappers around third party libraries or plugins; however many simple components
may need no more than
 # the abstract layer and gain the valuable benefit of not caring about the infrastructure
framework.
+#
+# Changes to this library should be coordinated with the jQuery version.
 define ["_", "./utils", "prototype"], (_, utils) ->
 
   # Save a local reference to Prototype.$ ... see notes about some challenges using Prototype,
jQuery,
@@ -305,8 +307,8 @@ define ["_", "./utils", "prototype"], (_, utils) ->
       else
         return null
 
-    # Returns an ElementWrapper for this element's containing element.  The ElementWrapper
is created lazily, and
-    # cached. Returns null if this element has no parentNode (either because this element
is the document object, or
+    # Returns an ElementWrapper for this element's containing element.
+    # Returns null if this element has no parent (either because this element is the document
object, or
     # because this element is not yet attached to the DOM).
     container: ->
       parentNode = @element.parentNode
@@ -414,8 +416,6 @@ define ["_", "./utils", "prototype"], (_, utils) ->
 
     [selector]
 
-  bodyWrapper = null
-
   # Performs an asynchronous Ajax request, invoking callbacks when it completes.
   #
   # This is very low level; most code will want to go through the `t5/core/ajax` module instead,
@@ -534,5 +534,4 @@ define ["_", "./utils", "prototype"], (_, utils) ->
     # Returns a wrapped version of the document.body element. Because all Tapestry JavaScript
occurs
     # inside a block at the end of the document, inside the `<body`> element, it is
assumed that
     # it is always safe to get the body.
-    body: ->
-      bodyWrapper ?= (wrapElement document.body)
\ No newline at end of file
+    body: -> (wrapElement document.body)
\ No newline at end of file


Mime
View raw message