Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Side by Side Diff: content/browser/resources/media/util/collapse.js

Issue 18889006: Removed old media-internals page and rewrote it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /**
2 * @fileoverview Sets up the event handlers for the collapsing containers
3 */
4
5 (function () {
6 "use strict";
7 var allCollapseDivs = document.querySelectorAll('.collapse');
8 goog.array.forEach(allCollapseDivs, function (elem) {
9 // find the header for the div, because we only want to trigger on that
10 var header = elem.querySelector("h2");
11 header.onclick = function () {
12 var wasOpen = elem.className.indexOf("open") !== -1;
13
14 if (wasOpen) {
15 elem.className = "collapse closed";
16 } else {
17 elem.className = "collapse open";
18 }
19 };
20 });
21
22 }());
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698