can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[livejournal] r22430: LJSUP-12691: Users page Manage ratings

Committer: dpetrov
LJSUP-12691: Users page Manage ratings
U   trunk/htdocs/js/basic.js
Modified: trunk/htdocs/js/basic.js
===================================================================
--- trunk/htdocs/js/basic.js	2012-07-12 11:29:59 UTC (rev 22429)
+++ trunk/htdocs/js/basic.js	2012-07-12 13:18:52 UTC (rev 22430)
@@ -155,7 +155,6 @@
 	if (obj && obj.hasOwnProperty(name)) {
 		return obj[name];
 	} else {
-		LJ.console
 		return void(0);
 	}
 };
@@ -1263,6 +1262,23 @@
 		setTimeout(function() {
 			func.apply(null, args);
 		}, 0);
+	},
+
+	/**
+	 * Create a function that will call a function func with arguments
+	 * through setTimeout set to zero.
+	 * @param {Function} func The function to wrap.
+	 * @param {Object} args Any arguments to attach to function call.
+	 *
+	 * @return {Function} Return newly created delayed function.
+	 */
+	defered: function(func, args) {
+		args = args || [];
+		return function() {
+			var args2 = args.concat([].slice.call(arguments, 0));
+
+			Function.defer(func, args2);
+		};
 	}
 });
 

Tags: can3p, dpetrov, js, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments