OLD | NEW |
---|---|
1 /* Copyright 2014 The Chromium Authors. All rights reserved. | 1 /* Copyright 2014 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 | 5 |
6 /** | 6 /** |
7 * On load, registers the handler to add the 'hide' class to the container | 7 * On load, registers the handler to add the 'hide' class to the container |
8 * element in order to hide it. | 8 * element in order to hide it. |
9 */ | 9 */ |
10 window.onload = function() { | 10 window.onload = function() { |
11 $('optin-label').addEventListener('click', function() { | 11 $('optin-label').addEventListener('click', function() { |
12 $('container').classList.add('hide'); | 12 $('container').classList.add('hide'); |
13 }); | 13 }); |
14 }; | 14 }; |
15 | |
16 /** | |
17 * Method called from Chrome to properly size the view. | |
huangs
2014/09/11 20:52:29
NIT: Mention what the method *does* before what it
Mathieu
2014/09/11 20:59:55
Done.
Mathieu
2014/09/11 20:59:55
Done.
| |
18 * @return {number} The height of the content, in pixels. | |
19 */ | |
20 function getContentHeight() { | |
21 return $('container').clientHeight; | |
22 } | |
OLD | NEW |