JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.3.2
[ckeditor.git] / _source / core / tools.js
index 8055566..9407fd7 100644 (file)
@@ -220,6 +220,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        return ( !!object && object instanceof Array );\r
                },\r
 \r
+               /**\r
+                * Whether the object contains no properties of it's own.\r
+                * @param object\r
+                */\r
                isEmpty : function ( object )\r
                {\r
                        for ( var i in object )\r
@@ -229,6 +233,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        }\r
                        return true;\r
                },\r
+\r
                /**\r
                 * Transforms a CSS property name to its relative DOM style name.\r
                 * @param {String} cssName The CSS property name.\r
@@ -337,7 +342,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                 */\r
                htmlEncodeAttr : function( text )\r
                {\r
-                       return text.replace( /"/g, '&quot;' ).replace( /</g, '&lt;' ).replace( />/, '&gt;' );\r
+                       return text.replace( /"/g, '&quot;' ).replace( /</g, '&lt;' ).replace( />/g, '&gt;' );\r
                },\r
 \r
                /**\r
@@ -668,6 +673,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        return fn && fn.apply( window, Array.prototype.slice.call( arguments, 1 ) );\r
                },\r
 \r
+               /**\r
+                * Append the 'px' length unit to the size if it's missing.\r
+                * @param length\r
+                */\r
                cssLength : (function()\r
                {\r
                        var decimalRegex = /^\d+(?:\.\d+)?$/;\r
@@ -677,11 +686,20 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        };\r
                })(),\r
 \r
+               /**\r
+                * String specified by {@param str} repeats {@param times} times.\r
+                * @param str\r
+                * @param times\r
+                */\r
                repeat : function( str, times )\r
                {\r
                        return new Array( times + 1 ).join( str );\r
                },\r
 \r
+               /**\r
+                * Return the first successfully executed function's return value that\r
+                * doesn't throw any exception.\r
+                */\r
                tryThese : function()\r
                {\r
                        var returnValue;\r