Author: johnh
Date: Tue Jun 30 16:58:06 2009
New Revision: 789828
URL: http://svn.apache.org/viewvc?rev=789828&view=rev
Log:
Support passing element into _toggle(el) to bring in line w/ Legacy API docs.
Modified:
incubator/shindig/trunk/features/src/main/javascript/features/core/legacy.js
Modified:
incubator/shindig/trunk/features/src/main/javascript/features/core/legacy.js
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/core/legacy.js?rev=789828&r1=789827&r2=789828&view=diff
==============================================================================
---
incubator/shindig/trunk/features/src/main/javascript/features/core/legacy.js
(original)
+++
incubator/shindig/trunk/features/src/main/javascript/features/core/legacy.js
Tue Jun 30 16:58:06 2009
@@ -259,7 +259,7 @@
* @param {String | HTMLElement} el The element to toggle.
*/
function _toggle(el) {
- el = _gel(el);
+ el = (typeof el === "string") ? _gel(el) : el;
if (el !== null) {
if (el.style.display.length === 0 || el.style.display === "block") {
el.style.display = "none";