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 {Array.<string>} */ | 9 /** @type {Array.<string>} */ |
10 ClipboardData.prototype.types; | 10 ClipboardData.prototype.types; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 /** @type {DOMTokenList} */ | 45 /** @type {DOMTokenList} */ |
46 Element.prototype.classList; | 46 Element.prototype.classList; |
47 | 47 |
48 /** @type {boolean} */ | 48 /** @type {boolean} */ |
49 Element.prototype.checked; | 49 Element.prototype.checked; |
50 | 50 |
51 | 51 |
52 /** @type {Window} */ | 52 /** @type {Window} */ |
53 HTMLIFrameElement.prototype.contentWindow; | 53 HTMLIFrameElement.prototype.contentWindow; |
54 | 54 |
| 55 /** |
| 56 * @param {string} selector |
| 57 * @return {?HTMLElement}. |
| 58 */ |
| 59 HTMLElement.prototype.querySelector = function(selector) {}; |
55 | 60 |
56 /** | 61 /** |
57 * @param {string} name | 62 * @param {string} name |
58 * @return {string} | 63 * @return {string} |
59 */ | 64 */ |
60 Node.prototype.getAttribute = function(name) { }; | 65 Node.prototype.getAttribute = function(name) { }; |
61 | 66 |
62 /** @type {string} */ | 67 /** @type {string} */ |
63 Node.prototype.value; | 68 Node.prototype.value; |
64 | 69 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 */ | 112 */ |
108 Event.prototype.initMouseEvent = function( | 113 Event.prototype.initMouseEvent = function( |
109 type, canBubble, cancelable, view, detail, | 114 type, canBubble, cancelable, view, detail, |
110 screenX, screenY, clientX, clientY, | 115 screenX, screenY, clientX, clientY, |
111 ctrlKey, altKey, shiftKey, metaKey, | 116 ctrlKey, altKey, shiftKey, metaKey, |
112 button, relatedTarget) {}; | 117 button, relatedTarget) {}; |
113 | 118 |
114 /** @type {Object} */ | 119 /** @type {Object} */ |
115 Event.prototype.data = {}; | 120 Event.prototype.data = {}; |
116 | 121 |
| 122 /** |
| 123 * @param {*} value |
| 124 * @return {boolean} whether value is an integer or not. |
| 125 */ |
| 126 Number.isInteger = function(value) {}; |
117 | 127 |
118 // Chrome implements XMLHttpRequest.responseURL starting from Chrome 37. | 128 // Chrome implements XMLHttpRequest.responseURL starting from Chrome 37. |
119 /** @type {string} */ | 129 /** @type {string} */ |
120 XMLHttpRequest.prototype.responseURL = ""; | 130 XMLHttpRequest.prototype.responseURL = ""; |
OLD | NEW |