sync with gnome
[gnome.introspection-doc-generator] / templates / resources / page.js
index 3d7c49c..2aee037 100644 (file)
@@ -126,8 +126,21 @@ RooDocsPage = {
             
         } 
         return d.getAttributeNS(ns, name) || d.getAttribute(ns+":"+name) || d.getAttribute(name) || d[name];
+    },
+    vis : '',
+    toggle : function()
+    {
+        this.vis = this.vis == '' ? 'none' : '';
+        var vis = this.vis;
+        // new browsers only...
+        Array.prototype.slice.call(
+            document.getElementsByClassName('expandable')
+        ).forEach(function(e) { 
+            if (!e.className.match(/notInherited/)) { 
+                e.style.display= vis; 
+            }
+        })
     }
-    
 }