dom5.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922
  1. /*******************************************************************************
  2. * Copyright (c) 2013 IBM Corporation and others.
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * http://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors:
  9. * IBM Corporation - initial API and implementation
  10. ******************************************************************************/
  11. /**
  12. * function querySelector(selectors)
  13. * http://www.w3.org/TR/2012/PR-selectors-api-20121213
  14. * @param {String} selectors
  15. * @memberOf Document
  16. * @returns {Element}
  17. */
  18. Document.prototype.querySelector=function(selectors){return new Element();};
  19. /**
  20. * function querySelectorAll(selectors)
  21. * http://www.w3.org/TR/2012/PR-selectors-api-20121213
  22. * @param {String} selectors
  23. * @memberOf Document
  24. * @returns {NodeList}
  25. */
  26. Document.prototype.querySelectorAll=function(selectors){return new NodeList();};
  27. /**
  28. * function querySelector(selectors)
  29. * http://www.w3.org/TR/2012/PR-selectors-api-20121213
  30. * @param {String} selectors
  31. * @memberOf DocumentFragment
  32. * @returns {Element}
  33. */
  34. DocumentFragment.prototype.querySelector=function(selectors){return new Element();};
  35. /**
  36. * function querySelectorAll(selectors)
  37. * http://www.w3.org/TR/2012/PR-selectors-api-20121213
  38. * @param {String} selectors
  39. * @memberOf DocumentFragment
  40. * @returns {NodeList}
  41. */
  42. DocumentFragment.prototype.querySelectorAll=function(selectors){return new NodeList();};
  43. /**
  44. * function querySelector(selectors)
  45. * http://www.w3.org/TR/2012/PR-selectors-api-20121213
  46. * @param {String} selectors
  47. * @memberOf Element
  48. * @returns {Element}
  49. */
  50. Element.prototype.querySelector=function(selectors){return new Element();};
  51. /**
  52. * function querySelectorAll(selectors)
  53. * http://www.w3.org/TR/2012/PR-selectors-api-20121213
  54. * @param {String} selectors
  55. * @memberOf Element
  56. * @returns {NodeList}
  57. */
  58. Element.prototype.querySelectorAll=function(selectors){return new NodeList();};
  59. /**
  60. * Property state
  61. * @type Object
  62. * @memberOf History
  63. */
  64. History.prototype.state=new Object();
  65. /**
  66. * function pushState(data,title,url)
  67. * http://www.w3.org/TR/2012/CR-html5-20121217/browsers.html#history
  68. * @param {Object} data
  69. * @param {String} title
  70. * @param {String} url - optional
  71. * @memberOf History
  72. */
  73. History.prototype.pushState=function(data,title,url){};
  74. /**
  75. * function replaceState(data,title,url)
  76. * http://www.w3.org/TR/2012/CR-html5-20121217/browsers.html#history
  77. * @param {Object} data
  78. * @param {String} title
  79. * @param {String} url - optional
  80. * @memberOf History
  81. */
  82. History.prototype.replaceState=function(data,title,url){};
  83. /**
  84. * Property sessionStorage
  85. * http://www.w3.org/TR/2011/CR-webstorage-20111208
  86. * @type Storage
  87. * @memberOf Window
  88. */
  89. Window.prototype.sessionStorage=new Storage();
  90. /**
  91. * Property localStorage
  92. * http://www.w3.org/TR/2011/CR-webstorage-20111208
  93. * @type Storage
  94. * @memberOf Window
  95. */
  96. Window.prototype.localStorage=new Storage();
  97. /**
  98. * Object Storage
  99. * http://www.w3.org/TR/2011/CR-webstorage-20111208
  100. */
  101. function Storage(){};
  102. Storage.prototype=new Object();
  103. /**
  104. * Property length
  105. * http://www.w3.org/TR/2011/CR-webstorage-20111208
  106. * @type Number
  107. * @memberOf Storage
  108. */
  109. Storage.prototype.length=new Number();
  110. /**
  111. * function key(index)
  112. * http://www.w3.org/TR/2011/CR-webstorage-20111208
  113. * @param {Number} index
  114. * @memberOf Storage
  115. * @returns String
  116. */
  117. Storage.prototype.key=function(index){return new String();};
  118. /**
  119. * function getItem(key)
  120. * http://www.w3.org/TR/2011/CR-webstorage-20111208
  121. * @param {String} key
  122. * @memberOf Storage
  123. * @returns String
  124. */
  125. Storage.prototype.getItem=function(key){return new String();};
  126. /**
  127. * function setItem(key,value)
  128. * http://www.w3.org/TR/2011/CR-webstorage-20111208
  129. * @param {String} key
  130. * @param {String} value
  131. * @memberOf Storage
  132. */
  133. Storage.prototype.setItem=function(key,value){};
  134. /**
  135. * function removeItem(key)
  136. * http://www.w3.org/TR/2011/CR-webstorage-20111208
  137. * @param {String} key
  138. * @memberOf Storage
  139. */
  140. Storage.prototype.removeItem=function(key){};
  141. /**
  142. * function clear()
  143. * http://www.w3.org/TR/2011/CR-webstorage-20111208
  144. * @memberOf Storage
  145. */
  146. Storage.prototype.clear=function(){};
  147. /**
  148. * Object WebSocket
  149. * http://www.w3.org/TR/2012/CR-websockets-20120920
  150. * @constructor
  151. * @param {String} url
  152. */
  153. function WebSocket(url){};
  154. WebSocket.prototype=new Object();
  155. /**
  156. * Constant WebSocket.CONNECTING=0
  157. * http://www.w3.org/TR/2012/CR-websockets-20120920
  158. * @constant
  159. * @type Number
  160. */
  161. WebSocket.prototype.CONNECTING=0;
  162. /**
  163. * Constant WebSocket.OPEN=1
  164. * http://www.w3.org/TR/2012/CR-websockets-20120920
  165. * @constant
  166. * @type Number
  167. */
  168. WebSocket.prototype.OPEN=1;
  169. /**
  170. * Constant WebSocket.CLOSING=2
  171. * http://www.w3.org/TR/2012/CR-websockets-20120920
  172. * @constant
  173. * @type Number
  174. */
  175. WebSocket.prototype.CLOSING=2;
  176. /**
  177. * Constant WebSocket.CLOSED=3
  178. * http://www.w3.org/TR/2012/CR-websockets-20120920
  179. * @constant
  180. * @type Number
  181. */
  182. WebSocket.prototype.CLOSED=3;
  183. /**
  184. * Property url
  185. * http://www.w3.org/TR/2012/CR-websockets-20120920
  186. * @type String
  187. * @memberOf WebSocket
  188. */
  189. WebSocket.prototype.url=new String();
  190. /**
  191. * Property readyState
  192. * http://www.w3.org/TR/2012/CR-websockets-20120920
  193. * @type Number
  194. * @memberOf WebSocket
  195. */
  196. WebSocket.prototype.readyState=new Number();
  197. /**
  198. * Property bufferedAmount
  199. * http://www.w3.org/TR/2012/CR-websockets-20120920
  200. * @type Number
  201. * @memberOf WebSocket
  202. */
  203. WebSocket.prototype.bufferedAmount=new Number();
  204. /**
  205. * Property extensions
  206. * http://www.w3.org/TR/2012/CR-websockets-20120920
  207. * @type String
  208. * @memberOf WebSocket
  209. */
  210. WebSocket.prototype.extensions=new String();
  211. /**
  212. * Property protocol
  213. * http://www.w3.org/TR/2012/CR-websockets-20120920
  214. * @type String
  215. * @memberOf WebSocket
  216. */
  217. WebSocket.prototype.protocol=new String();
  218. /**
  219. * Property binaryType
  220. * http://www.w3.org/TR/2012/CR-websockets-20120920
  221. * @type String
  222. * @memberOf WebSocket
  223. */
  224. WebSocket.prototype.binaryType=new String();
  225. /**
  226. * function close(code,reason)
  227. * http://www.w3.org/TR/2012/CR-websockets-20120920
  228. * @param {Number} code - optional
  229. * @param {String} reason - optional
  230. * @memberOf WebSocket
  231. */
  232. WebSocket.prototype.close=function(code,reason){};
  233. /**
  234. * function send(data)
  235. * http://www.w3.org/TR/2012/CR-websockets-20120920
  236. * @param {Object} data - may be a String, Blob, ArrayBuffer, or ArrayBufferView
  237. * @memberOf WebSocket
  238. */
  239. WebSocket.prototype.send=function(data){};
  240. /**
  241. * Property geolocation
  242. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  243. * @type Geolocation
  244. * @memberOf Navigator
  245. */
  246. Navigator.prototype.geolocation=new Geolocation();
  247. /**
  248. * Object Geolocation
  249. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  250. */
  251. function Geolocation(){};
  252. Geolocation.prototype=new Object();
  253. /**
  254. * function getCurrentPosition(successCallback,errorCallback,options)
  255. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510/
  256. * @param {Function} successCallback (Position pos)
  257. * @param {Function} errorCallback (PositionError error) - optional
  258. * @param {PositionOptions} options - optional
  259. * @memberOf Geolocation
  260. */
  261. Geolocation.prototype.getCurrentPosition=function(successCallback,errorCallback,options){};
  262. /**
  263. * function watchPosition(successCallback,errorCallback,options)
  264. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510/
  265. * @param {Function} successCallback (Position pos)
  266. * @param {Function} errorCallback (PositionError error) - optional
  267. * @param {PositionOptions} options - optional
  268. * @memberOf Geolocation
  269. * @returns {Number}
  270. */
  271. Geolocation.prototype.watchPosition=function(successCallback,errorCallback,options){return new Number();};
  272. /**
  273. * function clearWatch(watchId)
  274. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  275. * @param {Number} watchId
  276. * @memberOf Geolocation
  277. */
  278. Geolocation.prototype.clearWatch=function(watchId){};
  279. /**
  280. * Object Coordinates
  281. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  282. */
  283. function Coordinates(){};
  284. Coordinates.prototype=new Object();
  285. /**
  286. * Property latitude
  287. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  288. * @type Number
  289. * @memberOf Coordinates
  290. */
  291. Coordinates.prototype.latitude=new Number();;
  292. /**
  293. * Property longitude
  294. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  295. * @type Number
  296. * @memberOf Coordinates
  297. */
  298. Coordinates.prototype.longitude=new Number();;
  299. /**
  300. * Property altitude
  301. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  302. * @type Number
  303. * @memberOf Coordinates
  304. */
  305. Coordinates.prototype.altitude=new Number();;
  306. /**
  307. * Property accuracy
  308. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  309. * @type Number
  310. * @memberOf Coordinates
  311. */
  312. Coordinates.prototype.accuracy=new Number();;
  313. /**
  314. * Property altitudeAccuracy
  315. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  316. * @type Number
  317. * @memberOf Coordinates
  318. */
  319. Coordinates.prototype.altitudeAccuracy=new Number();;
  320. /**
  321. * Property heading
  322. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  323. * @type Number
  324. * @memberOf Coordinates
  325. */
  326. Coordinates.prototype.heading=new Number();;
  327. /**
  328. * Property speed
  329. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  330. * @type Number
  331. * @memberOf Coordinates
  332. */
  333. Coordinates.prototype.speed=new Number();
  334. /**
  335. * Object Position
  336. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  337. */
  338. function Position(){};
  339. Position.prototype=new Object();
  340. /**
  341. * Property coords
  342. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  343. * @type Coordinates
  344. * @memberOf Position
  345. */
  346. Position.prototype.coords=new Coordinates();
  347. /**
  348. * Property timestamp
  349. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  350. * @type Number
  351. * @memberOf Position
  352. */
  353. Position.prototype.timestamp=new Number;
  354. /**
  355. * Object PositionError
  356. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  357. */
  358. function PositionError(){};
  359. PositionError.prototype=new Object();
  360. /**
  361. * Constant PositionError.PERMISSION_DENIED=1
  362. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  363. * @constant
  364. * @type Number
  365. */
  366. PositionError.prototype.PERMISSION_DENIED=1;
  367. /**
  368. * Constant PositionError.POSITION_UNAVAILABLE=2
  369. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  370. * @constant
  371. * @type Number
  372. */
  373. PositionError.prototype.POSITION_UNAVAILABLE=2;
  374. /**
  375. * Constant PositionError.TIMEOUT=3
  376. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  377. * @constant
  378. * @type Number
  379. */
  380. PositionError.prototype.TIMEOUT=3;
  381. /**
  382. * Property code
  383. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  384. * @type Number
  385. * @memberOf PositionError
  386. */
  387. PositionError.prototype.code=new Number();
  388. /**
  389. * Property message
  390. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  391. * @type String
  392. * @memberOf PositionError
  393. */
  394. PositionError.prototype.message=new String();
  395. /**
  396. * Object PositionOptions
  397. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  398. */
  399. function PositionOptions(){};
  400. PositionOptions.prototype=new Object();
  401. /**
  402. * Property enableHighAccuracy
  403. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  404. * @type Boolean
  405. * @memberOf PositionOptions
  406. */
  407. PositionOptions.prototype.enableHighAccuracy=new Boolean();
  408. /**
  409. * Property timeout
  410. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  411. * @type Number
  412. * @memberOf PositionOptions
  413. */
  414. PositionOptions.prototype.timeout=new Number();
  415. /**
  416. * Property maximumAge
  417. * http://www.w3.org/TR/2012/PR-geolocation-API-20120510
  418. * @type Number
  419. * @memberOf PositionOptions
  420. */
  421. PositionOptions.prototype.maximumAge=new Number();
  422. /**
  423. * Object TimeRanges
  424. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  425. */
  426. function TimeRanges(){};
  427. TimeRanges.prototype=new Object();
  428. /**
  429. * Property length
  430. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  431. * @type Number
  432. * @memberOf TimeRanges
  433. */
  434. TimeRanges.prototype.length=new Number();
  435. /**
  436. * function start(index)
  437. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  438. * @param {Number} index
  439. * @memberOf TimeRanges
  440. * @returns {Number}
  441. */
  442. function start(index) {return new Number();};
  443. /**
  444. * function end(index)
  445. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  446. * @param {Number} index
  447. * @memberOf TimeRanges
  448. * @returns {Number}
  449. */
  450. function end(index) {return new Number();};
  451. /**
  452. * Object MediaError
  453. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  454. */
  455. function MediaError(){};
  456. MediaError.prototype=new Object();
  457. /**
  458. * Constant MediaError.MEDIA_ERR_ABORTED=1
  459. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  460. * @constant
  461. * @type Number
  462. */
  463. MediaError.prototype.MEDIA_ERR_ABORTED=1;
  464. /**
  465. * Constant MediaError.MEDIA_ERR_NETWORK=2
  466. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  467. * @constant
  468. * @type Number
  469. */
  470. MediaError.prototype.MEDIA_ERR_NETWORK=2;
  471. /**
  472. * Constant MediaError.MEDIA_ERR_DECODED=3
  473. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  474. * @constant
  475. * @type Number
  476. */
  477. MediaError.prototype.MEDIA_ERR_DECODE=3;
  478. /**
  479. * Constant MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED=4
  480. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  481. * @constant
  482. * @type Number
  483. */
  484. MediaError.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4;
  485. /**
  486. * Property code
  487. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  488. * @type Number
  489. * @memberOf MediaError
  490. */
  491. MediaError.prototype.code=new Number();
  492. /**
  493. * Object HTMLMediaElement
  494. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  495. * @augments HTMLElement
  496. * @see HTMLElement
  497. */
  498. function HTMLMediaElement(){};
  499. HTMLMediaElement.prototype = new HTMLElement();
  500. /**
  501. * Property src
  502. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  503. * @type String
  504. * @memberOf HTMLMediaElement
  505. */
  506. HTMLMediaElement.prototype.src=new String();
  507. /**
  508. * Property currentSrc
  509. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  510. * @type String
  511. * @memberOf HTMLMediaElement
  512. */
  513. HTMLMediaElement.prototype.currentSrc=new String();
  514. /**
  515. * Property crossOrigin
  516. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  517. * @type String
  518. * @memberOf HTMLMediaElement
  519. */
  520. HTMLMediaElement.prototype.crossOrigin=new String();
  521. /**
  522. * Constant HTMLMediaElement.NETWORK_EMPTY=0
  523. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  524. * @constant
  525. * @type Number
  526. */
  527. HTMLMediaElement.prototype.NETWORK_EMPTY=0;
  528. /**
  529. * Constant HTMLMediaElement.NETWORK_IDLE=1
  530. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  531. * @constant
  532. * @type Number
  533. */
  534. HTMLMediaElement.prototype.NETWORK_IDLE=1;
  535. /**
  536. * Constant HTMLMediaElement.NETWORK_LOADING=2
  537. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  538. * @constant
  539. * @type Number
  540. */
  541. HTMLMediaElement.prototype.NETWORK_LOADING=2;
  542. /**
  543. * Constant HTMLMediaElement.NETWORK_NO_SOURCE=3
  544. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  545. * @constant
  546. * @type Number
  547. */
  548. HTMLMediaElement.prototype.NETWORK_NO_SOURCE=3;
  549. /**
  550. * Property networkState
  551. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  552. * @type Number
  553. * @memberOf HTMLMediaElement
  554. */
  555. HTMLMediaElement.prototype.networkState=new Number();
  556. /**
  557. * Property preload
  558. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  559. * @type String
  560. * @memberOf HTMLMediaElement
  561. */
  562. HTMLMediaElement.prototype.preload=new String();
  563. /**
  564. * Property buffered
  565. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  566. * @type TimeRanges
  567. * @memberOf HTMLMediaElement
  568. */
  569. HTMLMediaElement.prototype.buffered=new TimeRanges();
  570. /**
  571. * function load()
  572. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  573. * @memberOf HTMLMediaElement
  574. */
  575. HTMLMediaElement.prototype.load=function(){};
  576. /**
  577. * function canPlayType(type)
  578. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  579. * @param {String} type
  580. * @memberOf HTMLMediaElement
  581. * @returns {String}
  582. */
  583. HTMLMediaElement.prototype.canPlayType=function(type){new String();};
  584. /**
  585. * Constant HTMLMediaElement.HAVE_NOTHING=0
  586. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  587. * @constant
  588. * @type Number
  589. */
  590. HTMLMediaElement.prototype.HAVE_NOTHING=0;
  591. /**
  592. * Constant HTMLMediaElement.HAVE_METADATA=1
  593. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  594. * @constant
  595. * @type Number
  596. */
  597. HTMLMediaElement.prototype.HAVE_METADATA=1;
  598. /**
  599. * Constant HTMLMediaElement.HAVE_CURRENT_DATA=2
  600. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  601. * @constant
  602. * @type Number
  603. */
  604. HTMLMediaElement.prototype.HAVE_CURRENT_DATA=2;
  605. /**
  606. * Constant HTMLMediaElement.HAVE_FUTURE_DATA=3
  607. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  608. * @constant
  609. * @type Number
  610. */
  611. HTMLMediaElement.prototype.HAVE_FUTURE_DATA=3;
  612. /**
  613. * Constant HTMLMediaElement.HAVE_ENOUGH_DATA=4
  614. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  615. * @constant
  616. * @type Number
  617. */
  618. HTMLMediaElement.prototype.HAVE_ENOUGH_DATA=4;
  619. /**
  620. * Property readyState
  621. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  622. * @type Number
  623. * @memberOf HTMLMediaElement
  624. */
  625. HTMLMediaElement.prototype.readyState=new Number();
  626. /**
  627. * Property seeking
  628. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  629. * @type Boolean
  630. * @memberOf HTMLMediaElement
  631. */
  632. HTMLMediaElement.prototype.seeking=new Boolean();
  633. /**
  634. * Property currentTime
  635. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  636. * @type Number
  637. * @memberOf HTMLMediaElement
  638. */
  639. HTMLMediaElement.prototype.currentTime=new Number();
  640. /**
  641. * Property initialTime
  642. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  643. * @type Number
  644. * @memberOf HTMLMediaElement
  645. */
  646. HTMLMediaElement.prototype.initialTime=new Number();
  647. /**
  648. * Property duration
  649. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  650. * @type Number
  651. * @memberOf HTMLMediaElement
  652. */
  653. HTMLMediaElement.prototype.duration=new Number();
  654. /**
  655. * Property startOffsetTime
  656. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  657. * @type Date
  658. * @memberOf HTMLMediaElement
  659. */
  660. HTMLMediaElement.prototype.startOffsetTime=new Date();
  661. /**
  662. * Property paused
  663. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  664. * @type Boolean
  665. * @memberOf HTMLMediaElement
  666. */
  667. HTMLMediaElement.prototype.paused=new Boolean();
  668. /**
  669. * Property defaultPlaybackRate
  670. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  671. * @type Number
  672. * @memberOf HTMLMediaElement
  673. */
  674. HTMLMediaElement.prototype.defaultPlaybackRate=new Number();
  675. /**
  676. * Property playbackRate
  677. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  678. * @type Number
  679. * @memberOf HTMLMediaElement
  680. */
  681. HTMLMediaElement.prototype.playbackRate=new Number();
  682. /**
  683. * Property played
  684. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  685. * @type TimeRanges
  686. * @memberOf HTMLMediaElement
  687. */
  688. HTMLMediaElement.prototype.played=new TimeRanges();
  689. /**
  690. * Property seekable
  691. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  692. * @type TimeRanges
  693. * @memberOf HTMLMediaElement
  694. */
  695. HTMLMediaElement.prototype.seekable=new TimeRanges();
  696. /**
  697. * Property ended
  698. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  699. * @type Boolean
  700. * @memberOf HTMLMediaElement
  701. */
  702. HTMLMediaElement.prototype.ended=new Boolean();
  703. /**
  704. * Property autoplay
  705. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  706. * @type Boolean
  707. * @memberOf HTMLMediaElement
  708. */
  709. HTMLMediaElement.prototype.autoplay=new Boolean();
  710. /**
  711. * Property loop
  712. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  713. * @type Boolean
  714. * @memberOf HTMLMediaElement
  715. */
  716. HTMLMediaElement.prototype.loop=new Boolean();
  717. /**
  718. * function play()
  719. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  720. * @memberOf HTMLMediaElement
  721. */
  722. HTMLMediaElement.prototype.play=function(){};
  723. /**
  724. * function pause()
  725. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  726. * @memberOf HTMLMediaElement
  727. */
  728. HTMLMediaElement.prototype.pause=function(){};
  729. /**
  730. * Property controls
  731. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  732. * @type Boolean
  733. * @memberOf HTMLMediaElement
  734. */
  735. HTMLMediaElement.prototype.controls=new Boolean();
  736. /**
  737. * Property volume
  738. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  739. * @type Number
  740. * @memberOf HTMLMediaElement
  741. */
  742. HTMLMediaElement.prototype.volume=new Number();
  743. /**
  744. * Property muted
  745. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  746. * @type Boolean
  747. * @memberOf HTMLMediaElement
  748. */
  749. HTMLMediaElement.prototype.muted=new Boolean();
  750. /**
  751. * Property defaultMuted
  752. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  753. * @type Boolean
  754. * @memberOf HTMLMediaElement
  755. */
  756. HTMLMediaElement.prototype.defaultMuted=new Boolean();
  757. /**
  758. * Object HTMLAudioElement
  759. * http://www.w3.org/TR/2012/WD-html5-20120329/the-audio-element.html
  760. * @augments HTMLMediaElement
  761. * @constructor
  762. * @param {String} src
  763. * @see HTMLMediaElement
  764. */
  765. function HTMLAudioElement(src){};
  766. HTMLAudioElement.prototype = new HTMLMediaElement();
  767. /**
  768. * Object HTMLVideoElement
  769. * http://www.w3.org/TR/2012/WD-html5-20120329/the-audio-element.html
  770. * @augments HTMLMediaElement
  771. * @see HTMLMediaElement
  772. */
  773. function HTMLVideoElement(){};
  774. HTMLVideoElement.prototype = new HTMLMediaElement();
  775. /**
  776. * Property width
  777. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  778. * @type Number
  779. * @memberOf HTMLVideoElement
  780. */
  781. HTMLVideoElement.prototype.width=new Number();
  782. /**
  783. * Property height
  784. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  785. * @type Number
  786. * @memberOf HTMLVideoElement
  787. */
  788. HTMLVideoElement.prototype.height=new Number();
  789. /**
  790. * Property videoWidth
  791. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  792. * @type Number
  793. * @memberOf HTMLVideoElement
  794. */
  795. HTMLVideoElement.prototype.videoWidth=new Number();
  796. /**
  797. * Property videoHeight
  798. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  799. * @type Number
  800. * @memberOf HTMLVideoElement
  801. */
  802. HTMLVideoElement.prototype.videoHeight=new Number();
  803. /**
  804. * Property poster
  805. * http://www.w3.org/TR/2012/WD-html5-20120329/media-elements.html
  806. * @type String
  807. * @memberOf HTMLVideoElement
  808. */
  809. HTMLVideoElement.prototype.poster=new String();