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 // This file contains various hacks needed to inform JSCompiler of various | 5 // This file contains various hacks needed to inform JSCompiler of various |
6 // WebKit- and Chrome-specific properties and methods. It is used only with | 6 // WebKit- and Chrome-specific properties and methods. It is used only with |
7 // JSCompiler to verify the type-correctness of our code. | 7 // JSCompiler to verify the type-correctness of our code. |
8 | 8 |
9 /** @type {HTMLElement} */ | 9 /** @type {HTMLElement} */ |
10 Document.prototype.activeElement; | 10 Document.prototype.activeElement; |
11 | 11 |
12 /** @type {Array.<HTMLElement>} */ | 12 /** @type {Array.<HTMLElement>} */ |
13 Document.prototype.all; | 13 Document.prototype.all; |
14 | 14 |
15 /** @type {boolean} */ | 15 /** @type {boolean} */ |
16 Document.prototype.hidden; | 16 Document.prototype.hidden; |
17 | 17 |
18 /** @type {function(string): void} */ | 18 /** @type {function(string): void} */ |
19 Document.prototype.execCommand = function(command) {}; | 19 Document.prototype.execCommand = function(command) {}; |
20 | 20 |
21 /** @return {void} Nothing. */ | 21 /** @return {void} Nothing. */ |
22 Document.prototype.webkitCancelFullScreen = function() {}; | 22 Document.prototype.webkitCancelFullScreen = function() {}; |
23 | 23 |
24 /** @type {boolean} */ | 24 /** @type {boolean} */ |
25 Document.prototype.webkitIsFullScreen; | 25 Document.prototype.webkitIsFullScreen; |
26 | 26 |
27 /** @type {boolean} */ | 27 /** @type {boolean} */ |
28 Document.prototype.webkitHidden; | 28 Document.prototype.webkitHidden; |
29 | 29 |
| 30 /** @type {Element} */ |
| 31 Document.prototype.firstElementChild; |
30 | 32 |
31 /** @type {number} */ | 33 /** @type {number} */ |
32 Element.ALLOW_KEYBOARD_INPUT; | 34 Element.ALLOW_KEYBOARD_INPUT; |
33 | 35 |
34 /** @param {number} flags | 36 /** @param {number} flags |
35 /** @return {void} Nothing. */ | 37 /** @return {void} Nothing. */ |
36 Element.prototype.webkitRequestFullScreen = function(flags) {}; | 38 Element.prototype.webkitRequestFullScreen = function(flags) {}; |
37 | 39 |
38 /** @type {boolean} */ | 40 /** @type {boolean} */ |
39 Element.prototype.hidden; | 41 Element.prototype.hidden; |
40 | 42 |
| 43 /** @type {string} */ |
| 44 Element.prototype.localName; |
| 45 |
| 46 /** @type {string} */ |
| 47 Element.prototype.textContent; |
| 48 |
41 | 49 |
42 /** @constructor | 50 /** @constructor |
43 @extends {HTMLElement} */ | 51 @extends {HTMLElement} */ |
44 var HTMLEmbedElement = function() { }; | 52 var HTMLEmbedElement = function() { }; |
45 | 53 |
46 /** @type {number} */ | 54 /** @type {number} */ |
47 HTMLEmbedElement.prototype.height; | 55 HTMLEmbedElement.prototype.height; |
48 | 56 |
49 /** @type {number} */ | 57 /** @type {number} */ |
50 HTMLEmbedElement.prototype.width; | 58 HTMLEmbedElement.prototype.width; |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 * @param {boolean} shiftKey | 243 * @param {boolean} shiftKey |
236 * @param {boolean} metaKey | 244 * @param {boolean} metaKey |
237 * @param {number} button | 245 * @param {number} button |
238 * @param {EventTarget} relatedTarget | 246 * @param {EventTarget} relatedTarget |
239 */ | 247 */ |
240 Event.prototype.initMouseEvent = function( | 248 Event.prototype.initMouseEvent = function( |
241 type, canBubble, cancelable, view, detail, | 249 type, canBubble, cancelable, view, detail, |
242 screenX, screenY, clientX, clientY, | 250 screenX, screenY, clientX, clientY, |
243 ctrlKey, altKey, shiftKey, metaKey, | 251 ctrlKey, altKey, shiftKey, metaKey, |
244 button, relatedTarget) {}; | 252 button, relatedTarget) {}; |
| 253 |
| 254 /** |
| 255 * @param {number} begin |
| 256 * @param {number=} end |
| 257 * @return {ArrayBuffer} |
| 258 */ |
| 259 ArrayBuffer.prototype.slice = function(begin, end) {}; |
OLD | NEW |