tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

w3c_dom1.js (25810B)


      1 /*
      2 * Copyright 2008 The 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 DOM Level 1 specification.
     19 *  The whole file has been fully type annotated. Created from
     20 *  http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html
     21 *
     22 * @externs
     23 * @author stevey@google.com (Steve Yegge)
     24 */
     25 
     26 /**
     27 * @constructor
     28 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-17189187
     29 */
     30 function DOMException() {}
     31 
     32 /**
     33 * @type {number}
     34 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
     35 */
     36 DOMException.INDEX_SIZE_ERR = 1;
     37 
     38 /**
     39 * @type {number}
     40 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
     41 */
     42 DOMException.DOMSTRING_SIZE_ERR = 2;
     43 
     44 /**
     45 * @type {number}
     46 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
     47 */
     48 DOMException.HIERARCHY_REQUEST_ERR = 3;
     49 
     50 /**
     51 * @type {number}
     52 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
     53 */
     54 DOMException.WRONG_DOCUMENT_ERR = 4;
     55 
     56 /**
     57 * @type {number}
     58 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
     59 */
     60 DOMException.INVALID_CHARACTER_ERR = 5;
     61 
     62 /**
     63 * @type {number}
     64 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
     65 */
     66 DOMException.NO_DATA_ALLOWED_ERR = 6;
     67 
     68 /**
     69 * @type {number}
     70 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
     71 */
     72 DOMException.NO_MODIFICATION_ALLOWED_ERR = 7;
     73 
     74 /**
     75 * @type {number}
     76 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
     77 */
     78 DOMException.NOT_FOUND_ERR = 8;
     79 
     80 /**
     81 * @type {number}
     82 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
     83 */
     84 DOMException.NOT_SUPPORTED_ERR = 9;
     85 
     86 /**
     87 * @type {number}
     88 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
     89 */
     90 DOMException.INUSE_ATTRIBUTE_ERR = 10;
     91 
     92 /**
     93 * @constructor
     94 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-258A00AF
     95 */
     96 function ExceptionCode() {}
     97 
     98 /**
     99 * @constructor
    100 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-102161490
    101 */
    102 function DOMImplementation() {}
    103 
    104 /**
    105 * @param {string} feature
    106 * @param {string} version
    107 * @return {boolean}
    108 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-5CED94D7
    109 * @nosideeffects
    110 */
    111 DOMImplementation.prototype.hasFeature = function(feature, version) {};
    112 
    113 /**
    114 * @constructor
    115 * @implements {EventTarget}
    116 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
    117 */
    118 function Node() {}
    119 
    120 /**
    121 * @param {boolean=} opt_useCapture
    122 * @override
    123 */
    124 Node.prototype.addEventListener = function(type, listener, opt_useCapture) {};
    125 
    126 /**
    127 * @param {boolean=} opt_useCapture
    128 * @override
    129 */
    130 Node.prototype.removeEventListener = function(type, listener, opt_useCapture) {};
    131 
    132 /** @override */
    133 Node.prototype.dispatchEvent = function(evt) {};
    134 
    135 /**
    136 * @type {NamedNodeMap}
    137 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-attributes
    138 */
    139 Node.prototype.attributes;
    140 
    141 /**
    142 * @type {!NodeList}
    143 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-childNodes
    144 */
    145 Node.prototype.childNodes;
    146 
    147 /**
    148 * @type {Node}
    149 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-firstChild
    150 */
    151 Node.prototype.firstChild;
    152 
    153 /**
    154 * @type {Node}
    155 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-lastChild
    156 */
    157 Node.prototype.lastChild;
    158 
    159 /**
    160 * @type {Node}
    161 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-nextSibling
    162 */
    163 Node.prototype.nextSibling;
    164 
    165 /**
    166 * @type {string}
    167 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-nodeName
    168 */
    169 Node.prototype.nodeName;
    170 
    171 /**
    172 * @type {string}
    173 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-nodeValue
    174 */
    175 Node.prototype.nodeValue;
    176 
    177 /**
    178 * @type {number}
    179 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-nodeType
    180 */
    181 Node.prototype.nodeType;
    182 
    183 /**
    184 * @type {Document}
    185 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-ownerDocument
    186 */
    187 Node.prototype.ownerDocument;
    188 
    189 /**
    190 * @type {Node}
    191 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-parentNode
    192 */
    193 Node.prototype.parentNode;
    194 
    195 /**
    196 * @type {Node}
    197 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-previousSibling
    198 */
    199 Node.prototype.previousSibling;
    200 
    201 /**
    202 * @param {Node} newChild
    203 * @return {Node}
    204 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-appendChild
    205 */
    206 Node.prototype.appendChild = function(newChild) {};
    207 
    208 /**
    209 * @param {boolean} deep
    210 * @return {!Node}
    211 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-cloneNode
    212 * @nosideeffects
    213 */
    214 Node.prototype.cloneNode = function(deep) {};
    215 
    216 /**
    217 * @return {boolean}
    218 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-hasChildNodes
    219 * @nosideeffects
    220 */
    221 Node.prototype.hasChildNodes = function() {};
    222 
    223 /**
    224 * @param {Node} newChild
    225 * @param {Node} refChild
    226 * @return {!Node}
    227 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-insertBefore
    228 */
    229 Node.prototype.insertBefore = function(newChild, refChild) {};
    230 
    231 /**
    232 * @param {Node} oldChild
    233 * @return {!Node}
    234 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-removeChild
    235 */
    236 Node.prototype.removeChild = function(oldChild) {};
    237 
    238 /**
    239 * @param {Node} newChild
    240 * @param {Node} oldChild
    241 * @return {!Node}
    242 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-replaceChild
    243 */
    244 Node.prototype.replaceChild = function(newChild, oldChild) {};
    245 
    246 /**
    247 * @type {number}
    248 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
    249 */
    250 Node.ATTRIBUTE_NODE;
    251 
    252 /**
    253 * @type {number}
    254 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
    255 */
    256 Node.CDATA_SECTION_NODE;
    257 
    258 /**
    259 * @type {number}
    260 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
    261 */
    262 Node.COMMENT_NODE;
    263 
    264 /**
    265 * @type {number}
    266 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
    267 */
    268 Node.DOCUMENT_FRAGMENT_NODE;
    269 
    270 /**
    271 * @type {number}
    272 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
    273 */
    274 Node.DOCUMENT_NODE;
    275 
    276 /**
    277 * @type {number}
    278 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
    279 */
    280 Node.DOCUMENT_TYPE_NODE;
    281 
    282 /**
    283 * @type {number}
    284 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
    285 */
    286 Node.ELEMENT_NODE;
    287 
    288 /**
    289 * @type {number}
    290 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
    291 */
    292 Node.ENTITY_NODE;
    293 
    294 /**
    295 * @type {number}
    296 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
    297 */
    298 Node.ENTITY_REFERENCE_NODE;
    299 
    300 /**
    301 * @type {number}
    302 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
    303 */
    304 Node.PROCESSING_INSTRUCTION_NODE;
    305 
    306 /**
    307 * @type {number}
    308 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
    309 */
    310 Node.TEXT_NODE;
    311 
    312 /**
    313 * @type {number}
    314 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
    315 */
    316 Node.XPATH_NAMESPACE_NODE;
    317 
    318 /**
    319 * @type {number}
    320 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247
    321 */
    322 Node.NOTATION_NODE;
    323 
    324 /**
    325 * @constructor
    326 * @extends {Node}
    327 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-B63ED1A3
    328 */
    329 function DocumentFragment() {}
    330 
    331 /**
    332 * @constructor
    333 * @extends {Node}
    334 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#i-Document
    335 */
    336 function Document() {}
    337 
    338 /**
    339 * @type {DocumentType}
    340 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-doctype
    341 */
    342 Document.prototype.doctype;
    343 
    344 /**
    345 * @type {!Element}
    346 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-documentElement
    347 */
    348 Document.prototype.documentElement;
    349 
    350 /**
    351 * @type {DOMImplementation}
    352 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-implementation
    353 */
    354 Document.prototype.implementation;
    355 
    356 /**
    357 * @param {string} name
    358 * @return {!Attr}
    359 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createAttribute
    360 * @nosideeffects
    361 */
    362 Document.prototype.createAttribute = function(name) {};
    363 
    364 /**
    365 * @param {string} data
    366 * @return {!Comment}
    367 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createComment
    368 * @nosideeffects
    369 */
    370 Document.prototype.createComment = function(data) {};
    371 
    372 /**
    373 * @param {string} data
    374 * @return {!CDATASection}
    375 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createCDATASection
    376 * @nosideeffects
    377 */
    378 Document.prototype.createCDATASection = function(data) {};
    379 
    380 /**
    381 * @return {!DocumentFragment}
    382 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createDocumentFragment
    383 * @nosideeffects
    384 */
    385 Document.prototype.createDocumentFragment = function() {};
    386 
    387 /**
    388 * Create a DOM element.
    389 *
    390 * Web components introduced the second parameter as a way of extending existing
    391 * tags (e.g. document.createElement('button', 'fancy-button')).
    392 *
    393 * @param {string} tagName
    394 * @param {string=} opt_typeExtension
    395 * @return {!Element}
    396 * @nosideeffects
    397 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createElement
    398 * @see http://w3c.github.io/webcomponents/spec/custom/#extensions-to-document-interface-to-instantiate
    399 */
    400 Document.prototype.createElement = function(tagName, opt_typeExtension) {};
    401 
    402 /**
    403 * @param {string} name
    404 * @return {!EntityReference}
    405 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createEntityReference
    406 * @nosideeffects
    407 */
    408 Document.prototype.createEntityReference = function(name) {};
    409 
    410 /**
    411 * @param {string} target
    412 * @param {string} data
    413 * @return {!ProcessingInstruction}
    414 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createProcessingInstruction
    415 * @nosideeffects
    416 */
    417 Document.prototype.createProcessingInstruction = function(target, data) {};
    418 
    419 /**
    420 * @param {number|string} data
    421 * @return {!Text}
    422 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-createTextNode
    423 * @nosideeffects
    424 */
    425 Document.prototype.createTextNode = function(data) {};
    426 
    427 /**
    428 * @param {string} tagname
    429 * @return {!NodeList}
    430 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-A6C9094
    431 * @nosideeffects
    432 */
    433 Document.prototype.getElementsByTagName = function(tagname) {};
    434 
    435 /**
    436 * @constructor
    437 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-536297177
    438 */
    439 function NodeList() {}
    440 
    441 /**
    442 * @type {number}
    443 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-203510337
    444 */
    445 NodeList.prototype.length;
    446 
    447 /**
    448 * @param {number} index
    449 * @return {Node}
    450 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-844377136
    451 */
    452 NodeList.prototype.item = function(index) {};
    453 
    454 /**
    455 * @constructor
    456 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1780488922
    457 */
    458 function NamedNodeMap() {}
    459 
    460 /**
    461 * @type {number}
    462 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-6D0FB19E
    463 */
    464 NamedNodeMap.prototype.length;
    465 
    466 /**
    467 * @param {string} name
    468 * @return {Node}
    469 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1074577549
    470 * @nosideeffects
    471 */
    472 NamedNodeMap.prototype.getNamedItem = function(name) {};
    473 
    474 /**
    475 * @param {number} index
    476 * @return {Node}
    477 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-349467F9
    478 * @nosideeffects
    479 */
    480 NamedNodeMap.prototype.item = function(index) {};
    481 
    482 /**
    483 * @param {string} name
    484 * @return {Node}
    485 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D58B193
    486 */
    487 NamedNodeMap.prototype.removeNamedItem = function(name) {};
    488 
    489 /**
    490 * @param {Node} arg
    491 * @return {Node}
    492 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1025163788
    493 */
    494 NamedNodeMap.prototype.setNamedItem = function(arg) {};
    495 
    496 /**
    497 * @constructor
    498 * @extends {Node}
    499 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-FF21A306
    500 */
    501 function CharacterData() {}
    502 
    503 /**
    504 * @type {string}
    505 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-72AB8359
    506 */
    507 CharacterData.prototype.data;
    508 
    509 /**
    510 * @type {number}
    511 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-7D61178C
    512 */
    513 CharacterData.prototype.length;
    514 
    515 /**
    516 * @param {string} arg
    517 * @return {undefined}
    518 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-32791A2F
    519 */
    520 CharacterData.prototype.appendData = function(arg) {};
    521 
    522 /**
    523 * @param {number} offset
    524 * @param {number} count
    525 * @return {undefined}
    526 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-7C603781
    527 */
    528 CharacterData.prototype.deleteData = function(offset, count) {};
    529 
    530 /**
    531 * @param {number} offset
    532 * @param {string} arg
    533 * @return {undefined}
    534 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-3EDB695F
    535 */
    536 CharacterData.prototype.insertData = function(offset, arg) {};
    537 
    538 /**
    539 * @param {number} offset
    540 * @param {number} count
    541 * @param {string} arg
    542 * @return {undefined}
    543 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-E5CBA7FB
    544 */
    545 CharacterData.prototype.replaceData = function(offset, count, arg) {};
    546 
    547 /**
    548 * @param {number} offset
    549 * @param {number} count
    550 * @return {string}
    551 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-6531BCCF
    552 * @nosideeffects
    553 */
    554 CharacterData.prototype.substringData = function(offset, count) {};
    555 
    556 /**
    557 * @constructor
    558 * @extends {Node}
    559 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-637646024
    560 */
    561 function Attr() {}
    562 
    563 /**
    564 * @type {string}
    565 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1112119403
    566 */
    567 Attr.prototype.name;
    568 
    569 /**
    570 * @type {boolean}
    571 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-862529273
    572 */
    573 Attr.prototype.specified;
    574 
    575 /**
    576 * @type {string}
    577 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-221662474
    578 */
    579 Attr.prototype.value;
    580 
    581 /**
    582 * @constructor
    583 * @extends {Node}
    584 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614
    585 */
    586 function Element() {}
    587 
    588 /**
    589 * @type {string}
    590 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#attribute-tagName
    591 */
    592 Element.prototype.tagName;
    593 
    594 /**
    595 * @param {string} name
    596 * @param {number?=} opt_flags
    597 * @return {string}
    598 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-getAttribute
    599 * @see http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx
    600 * @nosideeffects
    601 */
    602 Element.prototype.getAttribute = function(name, opt_flags) {};
    603 
    604 /**
    605 * @param {string} name
    606 * @return {Attr}
    607 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-getAttributeNode
    608 * @nosideeffects
    609 */
    610 Element.prototype.getAttributeNode = function(name) {};
    611 
    612 /**
    613 * @param {string} tagname
    614 * @return {!NodeList}
    615 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1938918D
    616 * @nosideeffects
    617 */
    618 Element.prototype.getElementsByTagName = function(tagname) {};
    619 
    620 /**
    621 * @param {string} name
    622 * @return {undefined}
    623 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-removeAttribute
    624 */
    625 Element.prototype.removeAttribute = function(name) {};
    626 
    627 /**
    628 * @param {Attr} oldAttr
    629 * @return {?Attr}
    630 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-removeAttributeNode
    631 */
    632 Element.prototype.removeAttributeNode = function(oldAttr) {};
    633 
    634 /**
    635 * @param {string} name
    636 * @param {string|number|boolean} value Values are converted to strings with
    637 *     ToString, so we accept number and boolean since both convert easily to
    638 *     strings.
    639 * @return {undefined}
    640 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-setAttribute
    641 */
    642 Element.prototype.setAttribute = function(name, value) {};
    643 
    644 /**
    645 * @param {Attr} newAttr
    646 * @return {?Attr}
    647 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-setAttributeNode
    648 */
    649 Element.prototype.setAttributeNode = function(newAttr) {};
    650 
    651 // Event handlers
    652 // The DOM level 3 spec has a good index of these
    653 // http://www.w3.org/TR/DOM-Level-3-Events/#event-types
    654 
    655 /** @type {?function (Event)} */ Element.prototype.onabort;
    656 /** @type {?function (Event)} */ Element.prototype.onbeforeinput;
    657 /** @type {?function (Event)} */ Element.prototype.onbeforeunload;
    658 /** @type {?function (Event)} */ Element.prototype.onblur;
    659 /** @type {?function (Event)} */ Element.prototype.onchange;
    660 /** @type {?function (Event)} */ Element.prototype.onclick;
    661 /** @type {?function (Event)} */ Element.prototype.oncompositionstart;
    662 /** @type {?function (Event)} */ Element.prototype.oncompositionupdate;
    663 /** @type {?function (Event)} */ Element.prototype.oncompositionend;
    664 /** @type {?function (Event)} */ Element.prototype.oncontextmenu;
    665 /** @type {?function (Event)} */ Element.prototype.oncopy;
    666 /** @type {?function (Event)} */ Element.prototype.oncut;
    667 /** @type {?function (Event)} */ Element.prototype.ondblclick;
    668 /** @type {?function (Event)} */ Element.prototype.onerror;
    669 /** @type {?function (Event)} */ Element.prototype.onfocus;
    670 /** @type {?function (Event)} */ Element.prototype.onfocusin;
    671 /** @type {?function (Event)} */ Element.prototype.onfocusout;
    672 /** @type {?function (Event)} */ Element.prototype.oninput;
    673 /** @type {?function (Event)} */ Element.prototype.onkeydown;
    674 /** @type {?function (Event)} */ Element.prototype.onkeypress;
    675 /** @type {?function (Event)} */ Element.prototype.onkeyup;
    676 /** @type {?function (Event)} */ Element.prototype.onload;
    677 /** @type {?function (Event)} */ Element.prototype.onunload;
    678 /** @type {?function (Event)} */ Element.prototype.onmousedown;
    679 /** @type {?function (Event)} */ Element.prototype.onmousemove;
    680 /** @type {?function (Event)} */ Element.prototype.onmouseout;
    681 /** @type {?function (Event)} */ Element.prototype.onmouseover;
    682 /** @type {?function (Event)} */ Element.prototype.onmouseup;
    683 /** @type {?function (Event)} */ Element.prototype.onmousewheel;
    684 /** @type {?function (Event)} */ Element.prototype.onpaste;
    685 /** @type {?function (Event)} */ Element.prototype.onreset;
    686 /** @type {?function (Event)} */ Element.prototype.onresize;
    687 /** @type {?function (Event)} */ Element.prototype.onscroll;
    688 /** @type {?function (Event)} */ Element.prototype.onselect;
    689 /** @type {?function (Event=)} */ Element.prototype.onsubmit;
    690 /** @type {?function (Event)} */ Element.prototype.ontextinput;
    691 /** @type {?function (Event)} */ Element.prototype.onwheel;
    692 
    693 /**
    694 * @constructor
    695 * @extends {CharacterData}
    696 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1312295772
    697 */
    698 function Text() {}
    699 
    700 /**
    701 * @param {number} offset
    702 * @return {Text}
    703 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-38853C1D
    704 */
    705 Text.prototype.splitText = function(offset) {};
    706 
    707 /**
    708 * @constructor
    709 * @extends {CharacterData}
    710 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1728279322
    711 */
    712 function Comment() {}
    713 
    714 /**
    715 * @constructor
    716 * @extends {Text}
    717 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-667469212
    718 */
    719 function CDATASection() {}
    720 
    721 /**
    722 * @constructor
    723 * @extends {Node}
    724 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-412266927
    725 */
    726 function DocumentType() {}
    727 
    728 /**
    729 * @type {NamedNodeMap}
    730 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1788794630
    731 */
    732 DocumentType.prototype.entities;
    733 
    734 /**
    735 * @type {string}
    736 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1844763134
    737 */
    738 DocumentType.prototype.name;
    739 
    740 /**
    741 * @type {NamedNodeMap}
    742 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D46829EF
    743 */
    744 DocumentType.prototype.notations;
    745 
    746 /**
    747 * @constructor
    748 * @extends {Node}
    749 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-5431D1B9
    750 */
    751 function Notation() {}
    752 
    753 /**
    754 * @type {string}
    755 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-54F2B4D0
    756 */
    757 Notation.prototype.publicId;
    758 
    759 /**
    760 * @type {string}
    761 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-E8AAB1D0
    762 */
    763 Notation.prototype.systemId;
    764 
    765 /**
    766 * @constructor
    767 * @extends {Node}
    768 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-527DCFF2
    769 */
    770 function Entity() {}
    771 
    772 /**
    773 * @type {string}
    774 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D7303025
    775 */
    776 Entity.prototype.publicId;
    777 
    778 /**
    779 * @type {string}
    780 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-D7C29F3E
    781 */
    782 Entity.prototype.systemId;
    783 
    784 /**
    785 * @type {string}
    786 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-6ABAEB38
    787 */
    788 Entity.prototype.notationName;
    789 
    790 /**
    791 * @constructor
    792 * @extends {Node}
    793 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-11C98490
    794 */
    795 function EntityReference() {}
    796 
    797 /**
    798 * @constructor
    799 * @extends {Node}
    800 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1004215813
    801 */
    802 function ProcessingInstruction() {}
    803 
    804 /**
    805 * @type {string}
    806 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-837822393
    807 */
    808 ProcessingInstruction.prototype.data;
    809 
    810 /**
    811 * @type {string}
    812 * @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1478689192
    813 */
    814 ProcessingInstruction.prototype.target;
    815 
    816 
    817 /**
    818 * @constructor
    819 * @implements {EventTarget}
    820 */
    821 function Window() {}
    822 Window.prototype.Window;
    823 
    824 /**
    825 * @param {boolean=} opt_useCapture
    826 * @override
    827 */
    828 Window.prototype.addEventListener = function(type, listener, opt_useCapture) {};
    829 
    830 /**
    831 * @param {boolean=} opt_useCapture
    832 * @override
    833 */
    834 Window.prototype.removeEventListener = function(type, listener, opt_useCapture)
    835    {};
    836 
    837 /** @override */
    838 Window.prototype.dispatchEvent = function(evt) {};
    839 
    840 /** @type {?function (Event)} */ Window.prototype.onabort;
    841 /** @type {?function (Event)} */ Window.prototype.onbeforeunload;
    842 /** @type {?function (Event)} */ Window.prototype.onblur;
    843 /** @type {?function (Event)} */ Window.prototype.onchange;
    844 /** @type {?function (Event)} */ Window.prototype.onclick;
    845 /** @type {?function (Event)} */ Window.prototype.onclose;
    846 /** @type {?function (Event)} */ Window.prototype.oncontextmenu;
    847 /** @type {?function (Event)} */ Window.prototype.ondblclick;
    848 /** @type {?function (Event)} */ Window.prototype.ondragdrop;
    849 // onerror has a special signature.
    850 // See https://developer.mozilla.org/en/DOM/window.onerror
    851 // and http://msdn.microsoft.com/en-us/library/cc197053(VS.85).aspx
    852 /** @type {?function (string, string, number)} */
    853 Window.prototype.onerror;
    854 /** @type {?function (Event)} */ Window.prototype.onfocus;
    855 /** @type {?function (Event)} */ Window.prototype.onhashchange;
    856 /** @type {?function (Event)} */ Window.prototype.onkeydown;
    857 /** @type {?function (Event)} */ Window.prototype.onkeypress;
    858 /** @type {?function (Event)} */ Window.prototype.onkeyup;
    859 /** @type {?function (Event)} */ Window.prototype.onload;
    860 /** @type {?function (Event)} */ Window.prototype.onmousedown;
    861 /** @type {?function (Event)} */ Window.prototype.onmousemove;
    862 /** @type {?function (Event)} */ Window.prototype.onmouseout;
    863 /** @type {?function (Event)} */ Window.prototype.onmouseover;
    864 /** @type {?function (Event)} */ Window.prototype.onmouseup;
    865 /** @type {?function (Event)} */ Window.prototype.onmousewheel;
    866 /** @type {?function (Event)} */ Window.prototype.onpaint;
    867 /** @type {?function (Event)} */ Window.prototype.onpopstate;
    868 /** @type {?function (Event)} */ Window.prototype.onreset;
    869 /** @type {?function (Event)} */ Window.prototype.onresize;
    870 /** @type {?function (Event)} */ Window.prototype.onscroll;
    871 /** @type {?function (Event)} */ Window.prototype.onselect;
    872 /** @type {?function (Event=)} */ Window.prototype.onsubmit;
    873 /** @type {?function (Event)} */ Window.prototype.onunload;
    874 /** @type {?function (Event)} */ Window.prototype.onwheel;