OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 cr.define('uber', function() { | 5 cr.define('uber', function() { |
6 /** | 6 /** |
7 * Options for how web history should be handled. | 7 * Options for how web history should be handled. |
8 */ | 8 */ |
9 var HISTORY_STATE_OPTION = { | 9 var HISTORY_STATE_OPTION = { |
10 PUSH: 1, // Push a new history state. | 10 PUSH: 1, // Push a new history state. |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 * immediately, rather than only after the transition ends. | 452 * immediately, rather than only after the transition ends. |
453 */ | 453 */ |
454 function ensureNonSelectedFrameContainersAreHidden() { | 454 function ensureNonSelectedFrameContainersAreHidden() { |
455 var containers = document.querySelectorAll('.iframe-container'); | 455 var containers = document.querySelectorAll('.iframe-container'); |
456 for (var i = 0; i < containers.length; i++) { | 456 for (var i = 0; i < containers.length; i++) { |
457 var container = containers[i]; | 457 var container = containers[i]; |
458 if (!container.classList.contains('selected')) { | 458 if (!container.classList.contains('selected')) { |
459 container.hidden = true; | 459 container.hidden = true; |
460 container.setAttribute('aria-hidden', 'true'); | 460 container.setAttribute('aria-hidden', 'true'); |
461 } | 461 } |
462 container.addEventListener('webkitTransitionEnd', function(event) { | 462 container.addEventListener('transitionend', function(event) { |
463 if (!event.target.classList.contains('selected')) | 463 if (!event.target.classList.contains('selected')) |
464 event.target.hidden = true; | 464 event.target.hidden = true; |
465 }); | 465 }); |
466 } | 466 } |
467 } | 467 } |
468 | 468 |
469 return { | 469 return { |
470 onLoad: onLoad, | 470 onLoad: onLoad, |
471 onPopHistoryState: onPopHistoryState | 471 onPopHistoryState: onPopHistoryState |
472 }; | 472 }; |
473 }); | 473 }); |
474 | 474 |
475 window.addEventListener('popstate', uber.onPopHistoryState); | 475 window.addEventListener('popstate', uber.onPopHistoryState); |
476 document.addEventListener('DOMContentLoaded', uber.onLoad); | 476 document.addEventListener('DOMContentLoaded', uber.onLoad); |
OLD | NEW |