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; |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 MediaSource.prototype.addSourceBuffer = function(format) {} | 178 MediaSource.prototype.addSourceBuffer = function(format) {} |
179 | 179 |
180 /** | 180 /** |
181 * @constructor | 181 * @constructor |
182 * @param {function(function(*), function(*)) : void} init | 182 * @param {function(function(*), function(*)) : void} init |
183 */ | 183 */ |
184 var Promise = function (init) {}; | 184 var Promise = function (init) {}; |
185 | 185 |
186 /** | 186 /** |
187 * @param {function(*=) : (Promise|void)} onFulfill | 187 * @param {function(*=) : (Promise|void)} onFulfill |
188 * @param {function(*=) : (Promise|void)} onReject | 188 * @param {function(*=) : (Promise|void)=} onReject |
189 * @return {Promise} | 189 * @return {Promise} |
190 */ | 190 */ |
191 Promise.prototype.then = function (onFulfill, onReject) {}; | 191 Promise.prototype.then = function (onFulfill, onReject) {}; |
192 | 192 |
193 /** | 193 /** |
194 * @param {function(*) : void} onReject | 194 * @param {function(*) : void} onReject |
195 * @return {Promise} | 195 * @return {Promise} |
196 */ | 196 */ |
197 Promise.prototype['catch'] = function (onReject) {}; | 197 Promise.prototype['catch'] = function (onReject) {}; |
198 | 198 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 * @param {boolean} shiftKey | 235 * @param {boolean} shiftKey |
236 * @param {boolean} metaKey | 236 * @param {boolean} metaKey |
237 * @param {number} button | 237 * @param {number} button |
238 * @param {EventTarget} relatedTarget | 238 * @param {EventTarget} relatedTarget |
239 */ | 239 */ |
240 Event.prototype.initMouseEvent = function( | 240 Event.prototype.initMouseEvent = function( |
241 type, canBubble, cancelable, view, detail, | 241 type, canBubble, cancelable, view, detail, |
242 screenX, screenY, clientX, clientY, | 242 screenX, screenY, clientX, clientY, |
243 ctrlKey, altKey, shiftKey, metaKey, | 243 ctrlKey, altKey, shiftKey, metaKey, |
244 button, relatedTarget) {}; | 244 button, relatedTarget) {}; |
OLD | NEW |