| 1 | /* |
| 2 | * Copyright 2008 Closure Compiler Authors |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /** |
| 18 | * @fileoverview Definitions for W3C's Selectors API. |
| 19 | * This file depends on w3c_dom1.js. |
| 20 | * @see http://www.w3.org/TR/selectors-api2/ |
| 21 | * |
| 22 | * @externs |
| 23 | */ |
| 24 | |
| 25 | /** |
| 26 | * @param {string} selectors |
| 27 | * @return {Element} |
| 28 | * @override |
| 29 | */ |
| 30 | Document.prototype.querySelector = function(selectors) {}; |
| 31 | |
| 32 | /** |
| 33 | * @param {string} selectors |
| 34 | * @return {!NodeList} |
| 35 | * @override |
| 36 | */ |
| 37 | Document.prototype.querySelectorAll = function(selectors) {}; |
| 38 | |
| 39 | /** |
| 40 | * @param {string} selectors |
| 41 | * @return {Element} |
| 42 | * @override |
| 43 | */ |
| 44 | Element.prototype.querySelector = function(selectors) {}; |
| 45 | |
| 46 | /** |
| 47 | * @param {string} selectors |
| 48 | * @return {!NodeList} |
| 49 | * @override |
| 50 | */ |
| 51 | Element.prototype.querySelectorAll = function(selectors) {}; |
| 52 | |
| 53 | /** |
| 54 | * @param {string} selectors |
| 55 | * @param {(Node|NodeList)=} refNodes |
| 56 | * @return {boolean} |
| 57 | */ |
| 58 | Element.prototype.matchesSelector = function(selectors, refNodes) {}; |
| 59 | |
| 60 | /** |
| 61 | * @see https://developer.mozilla.org/en/DOM/Node.mozMatchesSelector |
| 62 | * @param {string} selectors |
| 63 | * @return {boolean} |
| 64 | */ |
| 65 | Element.prototype.mozMatchesSelector = function(selectors) {}; |
| 66 | |
| 67 | /** |
| 68 | * @see http://developer.apple.com/library/safari/documentation/WebKit/Reference/ElementClassRef/Element/Element.html |
| 69 | * @param {string} selectors |
| 70 | * @return {boolean} |
| 71 | */ |
| 72 | Element.prototype.webkitMatchesSelector = function(selectors) {}; |
| 73 | |
| 74 | /** |
| 75 | * @see http://msdn.microsoft.com/en-us/library/ff975201.aspx |
| 76 | * @param {string} selectors |
| 77 | * @return {boolean} |
| 78 | */ |
| 79 | Element.prototype.msMatchesSelector = function(selectors) {}; |