OLD | NEW |
(Empty) | |
| 1 // DOM IDLs |
| 2 [Constructor(DOMString type, optional EventInit eventInitDict), |
| 3 Exposed=(Window,Worker)] |
| 4 interface Event { |
| 5 readonly attribute DOMString type; |
| 6 readonly attribute EventTarget? target; |
| 7 readonly attribute EventTarget? currentTarget; |
| 8 |
| 9 const unsigned short NONE = 0; |
| 10 const unsigned short CAPTURING_PHASE = 1; |
| 11 const unsigned short AT_TARGET = 2; |
| 12 const unsigned short BUBBLING_PHASE = 3; |
| 13 readonly attribute unsigned short eventPhase; |
| 14 |
| 15 void stopPropagation(); |
| 16 void stopImmediatePropagation(); |
| 17 |
| 18 readonly attribute boolean bubbles; |
| 19 readonly attribute boolean cancelable; |
| 20 void preventDefault(); |
| 21 readonly attribute boolean defaultPrevented; |
| 22 |
| 23 [Unforgeable] readonly attribute boolean isTrusted; |
| 24 readonly attribute DOMTimeStamp timeStamp; |
| 25 |
| 26 void initEvent(DOMString type, boolean bubbles, boolean cancelable); |
| 27 }; |
| 28 |
| 29 dictionary EventInit { |
| 30 boolean bubbles = false; |
| 31 boolean cancelable = false; |
| 32 }; |
| 33 |
| 34 [Constructor(DOMString type, optional CustomEventInit eventInitDict), |
| 35 Exposed=(Window,Worker)] |
| 36 interface CustomEvent : Event { |
| 37 readonly attribute any detail; |
| 38 |
| 39 void initCustomEvent(DOMString type, boolean bubbles, boolean cancelable, any
detail); |
| 40 }; |
| 41 |
| 42 dictionary CustomEventInit : EventInit { |
| 43 any detail = null; |
| 44 }; |
| 45 |
| 46 [Exposed=(Window,Worker)] |
| 47 interface EventTarget { |
| 48 void addEventListener(DOMString type, EventListener? callback, optional boolea
n capture = false); |
| 49 void removeEventListener(DOMString type, EventListener? callback, optional boo
lean capture = false); |
| 50 boolean dispatchEvent(Event event); |
| 51 }; |
| 52 |
| 53 callback interface EventListener { |
| 54 void handleEvent(Event event); |
| 55 }; |
| 56 |
| 57 [NoInterfaceObject] |
| 58 interface NonElementParentNode { |
| 59 Element? getElementById(DOMString elementId); |
| 60 }; |
| 61 Document implements NonElementParentNode; |
| 62 DocumentFragment implements NonElementParentNode; |
| 63 |
| 64 [NoInterfaceObject] |
| 65 interface ParentNode { |
| 66 [SameObject] readonly attribute HTMLCollection children; |
| 67 readonly attribute Element? firstElementChild; |
| 68 readonly attribute Element? lastElementChild; |
| 69 readonly attribute unsigned long childElementCount; |
| 70 |
| 71 [Unscopable] void prepend((Node or DOMString)... nodes); |
| 72 [Unscopable] void append((Node or DOMString)... nodes); |
| 73 |
| 74 Element? querySelector(DOMString selectors); |
| 75 [NewObject] NodeList querySelectorAll(DOMString selectors); |
| 76 }; |
| 77 Document implements ParentNode; |
| 78 DocumentFragment implements ParentNode; |
| 79 Element implements ParentNode; |
| 80 |
| 81 [NoInterfaceObject] |
| 82 interface NonDocumentTypeChildNode { |
| 83 readonly attribute Element? previousElementSibling; |
| 84 readonly attribute Element? nextElementSibling; |
| 85 }; |
| 86 Element implements NonDocumentTypeChildNode; |
| 87 CharacterData implements NonDocumentTypeChildNode; |
| 88 |
| 89 [NoInterfaceObject] |
| 90 interface ChildNode { |
| 91 [Unscopable] void before((Node or DOMString)... nodes); |
| 92 [Unscopable] void after((Node or DOMString)... nodes); |
| 93 [Unscopable] void replaceWith((Node or DOMString)... nodes); |
| 94 [Unscopable] void remove(); |
| 95 }; |
| 96 DocumentType implements ChildNode; |
| 97 Element implements ChildNode; |
| 98 CharacterData implements ChildNode; |
| 99 |
| 100 // XXX unrecognized tokens "class", "extends" |
| 101 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=20020 |
| 102 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=23225 |
| 103 //class Elements extends Array { |
| 104 // Element? query(DOMString relativeSelectors); |
| 105 // Elements queryAll(DOMString relativeSelectors); |
| 106 //}; |
| 107 |
| 108 interface NodeList { |
| 109 getter Node? item(unsigned long index); |
| 110 readonly attribute unsigned long length; |
| 111 // iterable<Node>; |
| 112 }; |
| 113 |
| 114 interface HTMLCollection { |
| 115 readonly attribute unsigned long length; |
| 116 getter Element? item(unsigned long index); |
| 117 getter Element? namedItem(DOMString name); |
| 118 }; |
| 119 |
| 120 [Constructor(MutationCallback callback)] |
| 121 interface MutationObserver { |
| 122 void observe(Node target, MutationObserverInit options); |
| 123 void disconnect(); |
| 124 sequence<MutationRecord> takeRecords(); |
| 125 }; |
| 126 |
| 127 callback MutationCallback = void (sequence<MutationRecord> mutations, MutationOb
server observer); |
| 128 |
| 129 dictionary MutationObserverInit { |
| 130 boolean childList = false; |
| 131 boolean attributes; |
| 132 boolean characterData; |
| 133 boolean subtree = false; |
| 134 boolean attributeOldValue; |
| 135 boolean characterDataOldValue; |
| 136 sequence<DOMString> attributeFilter; |
| 137 }; |
| 138 |
| 139 interface MutationRecord { |
| 140 readonly attribute DOMString type; |
| 141 readonly attribute Node target; |
| 142 [SameObject] readonly attribute NodeList addedNodes; |
| 143 [SameObject] readonly attribute NodeList removedNodes; |
| 144 readonly attribute Node? previousSibling; |
| 145 readonly attribute Node? nextSibling; |
| 146 readonly attribute DOMString? attributeName; |
| 147 readonly attribute DOMString? attributeNamespace; |
| 148 readonly attribute DOMString? oldValue; |
| 149 }; |
| 150 |
| 151 interface Node : EventTarget { |
| 152 const unsigned short ELEMENT_NODE = 1; |
| 153 const unsigned short ATTRIBUTE_NODE = 2; // historical |
| 154 const unsigned short TEXT_NODE = 3; |
| 155 const unsigned short CDATA_SECTION_NODE = 4; |
| 156 const unsigned short ENTITY_REFERENCE_NODE = 5; // historical |
| 157 const unsigned short ENTITY_NODE = 6; // historical |
| 158 const unsigned short PROCESSING_INSTRUCTION_NODE = 7; |
| 159 const unsigned short COMMENT_NODE = 8; |
| 160 const unsigned short DOCUMENT_NODE = 9; |
| 161 const unsigned short DOCUMENT_TYPE_NODE = 10; |
| 162 const unsigned short DOCUMENT_FRAGMENT_NODE = 11; |
| 163 const unsigned short NOTATION_NODE = 12; // historical |
| 164 readonly attribute unsigned short nodeType; |
| 165 readonly attribute DOMString nodeName; |
| 166 |
| 167 readonly attribute DOMString? baseURI; |
| 168 |
| 169 readonly attribute Document? ownerDocument; |
| 170 readonly attribute Node? parentNode; |
| 171 readonly attribute Element? parentElement; |
| 172 boolean hasChildNodes(); |
| 173 [SameObject] readonly attribute NodeList childNodes; |
| 174 readonly attribute Node? firstChild; |
| 175 readonly attribute Node? lastChild; |
| 176 readonly attribute Node? previousSibling; |
| 177 readonly attribute Node? nextSibling; |
| 178 |
| 179 attribute DOMString? nodeValue; |
| 180 attribute DOMString? textContent; |
| 181 void normalize(); |
| 182 |
| 183 [NewObject] Node cloneNode(optional boolean deep = false); |
| 184 boolean isEqualNode(Node? node); |
| 185 |
| 186 const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01; |
| 187 const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02; |
| 188 const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04; |
| 189 const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08; |
| 190 const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10; |
| 191 const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20; |
| 192 unsigned short compareDocumentPosition(Node other); |
| 193 boolean contains(Node? other); |
| 194 |
| 195 DOMString? lookupPrefix(DOMString? namespace); |
| 196 DOMString? lookupNamespaceURI(DOMString? prefix); |
| 197 boolean isDefaultNamespace(DOMString? namespace); |
| 198 |
| 199 Node insertBefore(Node node, Node? child); |
| 200 Node appendChild(Node node); |
| 201 Node replaceChild(Node node, Node child); |
| 202 Node removeChild(Node child); |
| 203 }; |
| 204 |
| 205 [Constructor] |
| 206 interface Document : Node { |
| 207 [SameObject] readonly attribute DOMImplementation implementation; |
| 208 readonly attribute DOMString URL; |
| 209 readonly attribute DOMString documentURI; |
| 210 readonly attribute DOMString origin; |
| 211 readonly attribute DOMString compatMode; |
| 212 readonly attribute DOMString characterSet; |
| 213 readonly attribute DOMString charset; // legacy alias of .characterSet |
| 214 readonly attribute DOMString inputEncoding; // legacy alias of .characterSet |
| 215 readonly attribute DOMString contentType; |
| 216 |
| 217 readonly attribute DocumentType? doctype; |
| 218 readonly attribute Element? documentElement; |
| 219 HTMLCollection getElementsByTagName(DOMString localName); |
| 220 HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localNam
e); |
| 221 HTMLCollection getElementsByClassName(DOMString classNames); |
| 222 |
| 223 [NewObject] Element createElement(DOMString localName); |
| 224 [NewObject] Element createElementNS(DOMString? namespace, DOMString qualifiedN
ame); |
| 225 [NewObject] DocumentFragment createDocumentFragment(); |
| 226 [NewObject] Text createTextNode(DOMString data); |
| 227 [NewObject] CDATASection createCDATASection(DOMString data); |
| 228 [NewObject] Comment createComment(DOMString data); |
| 229 [NewObject] ProcessingInstruction createProcessingInstruction(DOMString target
, DOMString data); |
| 230 |
| 231 [NewObject] Node importNode(Node node, optional boolean deep = false); |
| 232 Node adoptNode(Node node); |
| 233 |
| 234 [NewObject] Attr createAttribute(DOMString localName); |
| 235 [NewObject] Attr createAttributeNS(DOMString? namespace, DOMString name); |
| 236 |
| 237 [NewObject] Event createEvent(DOMString interface); |
| 238 |
| 239 [NewObject] Range createRange(); |
| 240 |
| 241 // NodeFilter.SHOW_ALL = 0xFFFFFFFF |
| 242 [NewObject] NodeIterator createNodeIterator(Node root, optional unsigned long
whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null); |
| 243 [NewObject] TreeWalker createTreeWalker(Node root, optional unsigned long what
ToShow = 0xFFFFFFFF, optional NodeFilter? filter = null); |
| 244 }; |
| 245 |
| 246 interface XMLDocument : Document {}; |
| 247 |
| 248 interface DOMImplementation { |
| 249 [NewObject] DocumentType createDocumentType(DOMString qualifiedName, DOMString
publicId, DOMString systemId); |
| 250 [NewObject] XMLDocument createDocument(DOMString? namespace, [TreatNullAs=Empt
yString] DOMString qualifiedName, optional DocumentType? doctype = null); |
| 251 [NewObject] Document createHTMLDocument(optional DOMString title); |
| 252 |
| 253 boolean hasFeature(); // useless; always returns true |
| 254 }; |
| 255 |
| 256 [Constructor] |
| 257 interface DocumentFragment : Node { |
| 258 }; |
| 259 |
| 260 interface DocumentType : Node { |
| 261 readonly attribute DOMString name; |
| 262 readonly attribute DOMString publicId; |
| 263 readonly attribute DOMString systemId; |
| 264 }; |
| 265 |
| 266 interface Element : Node { |
| 267 readonly attribute DOMString? namespaceURI; |
| 268 readonly attribute DOMString? prefix; |
| 269 readonly attribute DOMString localName; |
| 270 readonly attribute DOMString tagName; |
| 271 |
| 272 attribute DOMString id; |
| 273 attribute DOMString className; |
| 274 [SameObject, PutForwards=value] readonly attribute DOMTokenList classList; |
| 275 |
| 276 boolean hasAttributes(); |
| 277 [SameObject] readonly attribute NamedNodeMap attributes; |
| 278 sequence<DOMString> getAttributeNames(); |
| 279 DOMString? getAttribute(DOMString name); |
| 280 DOMString? getAttributeNS(DOMString? namespace, DOMString localName); |
| 281 void setAttribute(DOMString name, DOMString value); |
| 282 void setAttributeNS(DOMString? namespace, DOMString name, DOMString value); |
| 283 void removeAttribute(DOMString name); |
| 284 void removeAttributeNS(DOMString? namespace, DOMString localName); |
| 285 boolean hasAttribute(DOMString name); |
| 286 boolean hasAttributeNS(DOMString? namespace, DOMString localName); |
| 287 |
| 288 Attr? getAttributeNode(DOMString name); |
| 289 Attr? getAttributeNodeNS(DOMString? namespace, DOMString localName); |
| 290 Attr? setAttributeNode(Attr attr); |
| 291 Attr? setAttributeNodeNS(Attr attr); |
| 292 Attr removeAttributeNode(Attr attr); |
| 293 |
| 294 Element? closest(DOMString selectors); |
| 295 boolean matches(DOMString selectors); |
| 296 |
| 297 HTMLCollection getElementsByTagName(DOMString localName); |
| 298 HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localNam
e); |
| 299 HTMLCollection getElementsByClassName(DOMString classNames); |
| 300 }; |
| 301 |
| 302 interface NamedNodeMap { |
| 303 readonly attribute unsigned long length; |
| 304 getter Attr? item(unsigned long index); |
| 305 getter Attr? getNamedItem(DOMString name); |
| 306 Attr? getNamedItemNS(DOMString? namespace, DOMString localName); |
| 307 Attr? setNamedItem(Attr attr); |
| 308 Attr? setNamedItemNS(Attr attr); |
| 309 Attr removeNamedItem(DOMString name); |
| 310 Attr removeNamedItemNS(DOMString? namespace, DOMString localName); |
| 311 }; |
| 312 |
| 313 interface Attr { |
| 314 readonly attribute DOMString? namespaceURI; |
| 315 readonly attribute DOMString? prefix; |
| 316 readonly attribute DOMString localName; |
| 317 readonly attribute DOMString name; |
| 318 attribute DOMString value; |
| 319 attribute DOMString nodeValue; // legacy alias of .value |
| 320 attribute DOMString textContent; // legacy alias of .value |
| 321 |
| 322 readonly attribute Element? ownerElement; |
| 323 |
| 324 readonly attribute boolean specified; // useless; always returns true |
| 325 }; |
| 326 |
| 327 interface CharacterData : Node { |
| 328 [TreatNullAs=EmptyString] attribute DOMString data; |
| 329 readonly attribute unsigned long length; |
| 330 DOMString substringData(unsigned long offset, unsigned long count); |
| 331 void appendData(DOMString data); |
| 332 void insertData(unsigned long offset, DOMString data); |
| 333 void deleteData(unsigned long offset, unsigned long count); |
| 334 void replaceData(unsigned long offset, unsigned long count, DOMString data); |
| 335 }; |
| 336 |
| 337 [Constructor(optional DOMString data = "")] |
| 338 interface Text : CharacterData { |
| 339 [NewObject] Text splitText(unsigned long offset); |
| 340 readonly attribute DOMString wholeText; |
| 341 }; |
| 342 |
| 343 [Exposed=Window] |
| 344 interface CDATASection : Text { |
| 345 }; |
| 346 |
| 347 interface ProcessingInstruction : CharacterData { |
| 348 readonly attribute DOMString target; |
| 349 }; |
| 350 |
| 351 [Constructor(optional DOMString data = "")] |
| 352 interface Comment : CharacterData { |
| 353 }; |
| 354 |
| 355 [Constructor] |
| 356 interface Range { |
| 357 readonly attribute Node startContainer; |
| 358 readonly attribute unsigned long startOffset; |
| 359 readonly attribute Node endContainer; |
| 360 readonly attribute unsigned long endOffset; |
| 361 readonly attribute boolean collapsed; |
| 362 readonly attribute Node commonAncestorContainer; |
| 363 |
| 364 void setStart(Node node, unsigned long offset); |
| 365 void setEnd(Node node, unsigned long offset); |
| 366 void setStartBefore(Node node); |
| 367 void setStartAfter(Node node); |
| 368 void setEndBefore(Node node); |
| 369 void setEndAfter(Node node); |
| 370 void collapse(optional boolean toStart = false); |
| 371 void selectNode(Node node); |
| 372 void selectNodeContents(Node node); |
| 373 |
| 374 const unsigned short START_TO_START = 0; |
| 375 const unsigned short START_TO_END = 1; |
| 376 const unsigned short END_TO_END = 2; |
| 377 const unsigned short END_TO_START = 3; |
| 378 short compareBoundaryPoints(unsigned short how, Range sourceRange); |
| 379 |
| 380 void deleteContents(); |
| 381 [NewObject] DocumentFragment extractContents(); |
| 382 [NewObject] DocumentFragment cloneContents(); |
| 383 void insertNode(Node node); |
| 384 void surroundContents(Node newParent); |
| 385 |
| 386 [NewObject] Range cloneRange(); |
| 387 void detach(); |
| 388 |
| 389 boolean isPointInRange(Node node, unsigned long offset); |
| 390 short comparePoint(Node node, unsigned long offset); |
| 391 |
| 392 boolean intersectsNode(Node node); |
| 393 |
| 394 stringifier; |
| 395 }; |
| 396 |
| 397 interface NodeIterator { |
| 398 [SameObject] readonly attribute Node root; |
| 399 readonly attribute Node referenceNode; |
| 400 readonly attribute boolean pointerBeforeReferenceNode; |
| 401 readonly attribute unsigned long whatToShow; |
| 402 readonly attribute NodeFilter? filter; |
| 403 |
| 404 Node? nextNode(); |
| 405 Node? previousNode(); |
| 406 |
| 407 void detach(); |
| 408 }; |
| 409 |
| 410 interface TreeWalker { |
| 411 [SameObject] readonly attribute Node root; |
| 412 readonly attribute unsigned long whatToShow; |
| 413 readonly attribute NodeFilter? filter; |
| 414 attribute Node currentNode; |
| 415 |
| 416 Node? parentNode(); |
| 417 Node? firstChild(); |
| 418 Node? lastChild(); |
| 419 Node? previousSibling(); |
| 420 Node? nextSibling(); |
| 421 Node? previousNode(); |
| 422 Node? nextNode(); |
| 423 }; |
| 424 |
| 425 callback interface NodeFilter { |
| 426 // Constants for acceptNode() |
| 427 const unsigned short FILTER_ACCEPT = 1; |
| 428 const unsigned short FILTER_REJECT = 2; |
| 429 const unsigned short FILTER_SKIP = 3; |
| 430 |
| 431 // Constants for whatToShow |
| 432 const unsigned long SHOW_ALL = 0xFFFFFFFF; |
| 433 const unsigned long SHOW_ELEMENT = 0x1; |
| 434 const unsigned long SHOW_ATTRIBUTE = 0x2; // historical |
| 435 const unsigned long SHOW_TEXT = 0x4; |
| 436 const unsigned long SHOW_CDATA_SECTION = 0x8; |
| 437 const unsigned long SHOW_ENTITY_REFERENCE = 0x10; // historical |
| 438 const unsigned long SHOW_ENTITY = 0x20; // historical |
| 439 const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x40; |
| 440 const unsigned long SHOW_COMMENT = 0x80; |
| 441 const unsigned long SHOW_DOCUMENT = 0x100; |
| 442 const unsigned long SHOW_DOCUMENT_TYPE = 0x200; |
| 443 const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x400; |
| 444 const unsigned long SHOW_NOTATION = 0x800; // historical |
| 445 |
| 446 unsigned short acceptNode(Node node); |
| 447 }; |
| 448 |
| 449 interface DOMTokenList { |
| 450 readonly attribute unsigned long length; |
| 451 getter DOMString? item(unsigned long index); |
| 452 boolean contains(DOMString token); |
| 453 [CEReactions] void add(DOMString... tokens); |
| 454 [CEReactions] void remove(DOMString... tokens); |
| 455 [CEReactions] boolean toggle(DOMString token, optional boolean force); |
| 456 [CEReactions] void replace(DOMString token, DOMString newToken); |
| 457 boolean supports(DOMString token); |
| 458 [CEReactions] stringifier attribute DOMString value; |
| 459 // iterable<DOMString>; |
| 460 }; |
| 461 |
| 462 // UI Events IDLs |
| 463 [Constructor(DOMString type, optional UIEventInit eventInitDict)] |
| 464 interface UIEvent : Event { |
| 465 readonly attribute WindowProxy? view; |
| 466 readonly attribute long detail; |
| 467 }; |
| 468 |
| 469 dictionary UIEventInit : EventInit { |
| 470 WindowProxy? view = null; |
| 471 long detail = 0; |
| 472 }; |
| 473 |
| 474 [Constructor(DOMString typeArg, optional MouseEventInit mouseEventInitDict)] |
| 475 interface MouseEvent : UIEvent { |
| 476 readonly attribute long screenX; |
| 477 readonly attribute long screenY; |
| 478 readonly attribute long clientX; |
| 479 readonly attribute long clientY; |
| 480 readonly attribute boolean ctrlKey; |
| 481 readonly attribute boolean shiftKey; |
| 482 readonly attribute boolean altKey; |
| 483 readonly attribute boolean metaKey; |
| 484 readonly attribute short button; |
| 485 readonly attribute EventTarget? relatedTarget; |
| 486 // Introduced in DOM Level 3 |
| 487 readonly attribute unsigned short buttons; |
| 488 boolean getModifierState (DOMString keyArg); |
| 489 }; |
| 490 |
| 491 dictionary MouseEventInit : EventModifierInit { |
| 492 long screenX = 0; |
| 493 long screenY = 0; |
| 494 long clientX = 0; |
| 495 long clientY = 0; |
| 496 short button = 0; |
| 497 unsigned short buttons = 0; |
| 498 EventTarget? relatedTarget = null; |
| 499 }; |
| 500 |
| 501 dictionary EventModifierInit : UIEventInit { |
| 502 boolean ctrlKey = false; |
| 503 boolean shiftKey = false; |
| 504 boolean altKey = false; |
| 505 boolean metaKey = false; |
| 506 boolean keyModifierStateAltGraph = false; |
| 507 boolean keyModifierStateCapsLock = false; |
| 508 boolean keyModifierStateFn = false; |
| 509 boolean keyModifierStateFnLock = false; |
| 510 boolean keyModifierStateHyper = false; |
| 511 boolean keyModifierStateNumLock = false; |
| 512 boolean keyModifierStateOS = false; |
| 513 boolean keyModifierStateScrollLock = false; |
| 514 boolean keyModifierStateSuper = false; |
| 515 boolean keyModifierStateSymbol = false; |
| 516 boolean keyModifierStateSymbolLock = false; |
| 517 }; |
| 518 |
| 519 partial interface MouseEvent { |
| 520 // Deprecated in DOM Level 3 |
| 521 void initMouseEvent (DOMString typeArg, boolean bubblesArg, boolean cancelab
leArg, Window? viewArg, long detailArg, long screenXArg, long screenYArg, long c
lientXArg, long clientYArg, boolean ctrlKeyArg, boolean altKeyArg, boolean shift
KeyArg, boolean metaKeyArg, short buttonArg, EventTarget? relatedTargetArg); |
| 522 }; |
| 523 |
| 524 // Touch Events IDLs |
| 525 interface Touch { |
| 526 readonly attribute long identifier; |
| 527 readonly attribute EventTarget target; |
| 528 readonly attribute long screenX; |
| 529 readonly attribute long screenY; |
| 530 readonly attribute long clientX; |
| 531 readonly attribute long clientY; |
| 532 readonly attribute long pageX; |
| 533 readonly attribute long pageY; |
| 534 }; |
| 535 |
| 536 // CSSOM IDLs |
| 537 interface MediaList { |
| 538 stringifier attribute DOMString mediaText; |
| 539 readonly attribute unsigned long length; |
| 540 getter DOMString item(unsigned long index); |
| 541 void appendMedium(DOMString medium); |
| 542 void deleteMedium(DOMString medium); |
| 543 }; |
| 544 |
| 545 interface StyleSheet { |
| 546 readonly attribute DOMString type; |
| 547 readonly attribute DOMString href; |
| 548 readonly attribute Node ownerNode; |
| 549 readonly attribute StyleSheet parentStyleSheet; |
| 550 readonly attribute DOMString title; |
| 551 [PutForwards=mediaText] readonly attribute MediaList media; |
| 552 attribute boolean disabled; |
| 553 }; |
| 554 |
| 555 interface CSSStyleSheet : StyleSheet { |
| 556 readonly attribute CSSRule ownerRule; |
| 557 readonly attribute CSSRuleList cssRules; |
| 558 unsigned long insertRule(DOMString rule, unsigned long index); |
| 559 void deleteRule(unsigned long index); |
| 560 }; |
| 561 |
| 562 typedef sequence<StyleSheet> StyleSheetList; |
| 563 |
| 564 partial interface Document { |
| 565 [SameObject] readonly attribute StyleSheetList styleSheets; |
| 566 }; |
| 567 |
| 568 [NoInterfaceObject] interface LinkStyle { |
| 569 readonly attribute StyleSheet sheet; |
| 570 }; |
| 571 |
| 572 ProcessingInstruction implements LinkStyle; |
| 573 |
| 574 typedef sequence<CSSRule> CSSRuleList; |
| 575 |
| 576 interface CSSRule { |
| 577 // Types |
| 578 const unsigned short STYLE_RULE = 1; |
| 579 const unsigned short IMPORT_RULE = 3; |
| 580 const unsigned short MEDIA_RULE = 4; |
| 581 const unsigned short FONT_FACE_RULE = 5; |
| 582 const unsigned short PAGE_RULE = 6; |
| 583 const unsigned short NAMESPACE_RULE = 10; |
| 584 readonly attribute unsigned short type; |
| 585 |
| 586 // Parsing and serialization |
| 587 attribute DOMString cssText; |
| 588 |
| 589 // Context |
| 590 readonly attribute CSSRule parentRule; |
| 591 readonly attribute CSSStyleSheet parentStyleSheet; |
| 592 }; |
| 593 |
| 594 interface CSSStyleRule : CSSRule { |
| 595 attribute DOMString selectorText; |
| 596 readonly attribute CSSStyleDeclaration style; |
| 597 }; |
| 598 |
| 599 interface CSSImportRule : CSSRule { |
| 600 readonly attribute DOMString href; |
| 601 [PutForwards=mediaText] readonly attribute MediaList media; |
| 602 readonly attribute CSSStyleSheet styleSheet; |
| 603 }; |
| 604 |
| 605 interface CSSMediaRule : CSSRule { |
| 606 [PutForwards=mediaText] readonly attribute MediaList media; |
| 607 readonly attribute CSSRuleList cssRules; |
| 608 unsigned long insertRule(DOMString rule, unsigned long index); |
| 609 void deleteRule(unsigned long index); |
| 610 }; |
| 611 |
| 612 interface CSSFontFaceRule : CSSRule { |
| 613 readonly attribute CSSStyleDeclaration style; |
| 614 }; |
| 615 |
| 616 interface CSSPageRule : CSSRule { |
| 617 attribute DOMString selectorText; |
| 618 readonly attribute CSSStyleDeclaration style; |
| 619 }; |
| 620 |
| 621 interface CSSNamespaceRule : CSSRule { |
| 622 readonly attribute DOMString namespaceURI; |
| 623 readonly attribute DOMString? prefix; |
| 624 }; |
| 625 |
| 626 interface CSSStyleDeclaration { |
| 627 attribute DOMString cssText; |
| 628 |
| 629 readonly attribute unsigned long length; |
| 630 DOMString item(unsigned long index); |
| 631 |
| 632 DOMString getPropertyValue(DOMString property); |
| 633 DOMString getPropertyPriority(DOMString property); |
| 634 void setProperty(DOMString property, DOMString value, optional DOMString prior
ity); |
| 635 DOMString removeProperty(DOMString property); |
| 636 |
| 637 readonly attribute CSSStyleDeclarationValue values; |
| 638 |
| 639 readonly attribute CSSRule parentRule; |
| 640 |
| 641 // CSS Properties |
| 642 attribute DOMString azimuth; |
| 643 attribute DOMString background; |
| 644 attribute DOMString backgroundAttachment; |
| 645 attribute DOMString backgroundColor; |
| 646 attribute DOMString backgroundImage; |
| 647 attribute DOMString backgroundPosition; |
| 648 attribute DOMString backgroundRepeat; |
| 649 attribute DOMString border; |
| 650 attribute DOMString borderCollapse; |
| 651 attribute DOMString borderColor; |
| 652 attribute DOMString borderSpacing; |
| 653 attribute DOMString borderStyle; |
| 654 attribute DOMString borderTop; |
| 655 attribute DOMString borderRight; |
| 656 attribute DOMString borderBottom; |
| 657 attribute DOMString borderLeft; |
| 658 attribute DOMString borderTopColor; |
| 659 attribute DOMString borderRightColor; |
| 660 attribute DOMString borderBottomColor; |
| 661 attribute DOMString borderLeftColor; |
| 662 attribute DOMString borderTopStyle; |
| 663 attribute DOMString borderRightStyle; |
| 664 attribute DOMString borderBottomStyle; |
| 665 attribute DOMString borderLeftStyle; |
| 666 attribute DOMString borderTopWidth; |
| 667 attribute DOMString borderRightWidth; |
| 668 attribute DOMString borderBottomWidth; |
| 669 attribute DOMString borderLeftWidth; |
| 670 attribute DOMString borderWidth; |
| 671 attribute DOMString bottom; |
| 672 attribute DOMString captionSide; |
| 673 attribute DOMString clear; |
| 674 attribute DOMString clip; |
| 675 attribute DOMString color; |
| 676 attribute DOMString content; |
| 677 attribute DOMString counterIncrement; |
| 678 attribute DOMString counterReset; |
| 679 attribute DOMString cue; |
| 680 attribute DOMString cueAfter; |
| 681 attribute DOMString cueBefore; |
| 682 attribute DOMString cursor; |
| 683 attribute DOMString direction; |
| 684 attribute DOMString display; |
| 685 attribute DOMString elevation; |
| 686 attribute DOMString emptyCells; |
| 687 attribute DOMString cssFloat; |
| 688 attribute DOMString font; |
| 689 attribute DOMString fontFamily; |
| 690 attribute DOMString fontSize; |
| 691 attribute DOMString fontSizeAdjust; |
| 692 attribute DOMString fontStretch; |
| 693 attribute DOMString fontStyle; |
| 694 attribute DOMString fontVariant; |
| 695 attribute DOMString fontWeight; |
| 696 attribute DOMString height; |
| 697 attribute DOMString left; |
| 698 attribute DOMString letterSpacing; |
| 699 attribute DOMString lineHeight; |
| 700 attribute DOMString listStyle; |
| 701 attribute DOMString listStyleImage; |
| 702 attribute DOMString listStylePosition; |
| 703 attribute DOMString listStyleType; |
| 704 attribute DOMString margin; |
| 705 attribute DOMString marginTop; |
| 706 attribute DOMString marginRight; |
| 707 attribute DOMString marginBottom; |
| 708 attribute DOMString marginLeft; |
| 709 attribute DOMString marks; |
| 710 attribute DOMString maxHeight; |
| 711 attribute DOMString maxWidth; |
| 712 attribute DOMString minHeight; |
| 713 attribute DOMString minWidth; |
| 714 attribute DOMString orphans; |
| 715 attribute DOMString outline; |
| 716 attribute DOMString outlineColor; |
| 717 attribute DOMString outlineStyle; |
| 718 attribute DOMString outlineWidth; |
| 719 attribute DOMString overflow; |
| 720 attribute DOMString padding; |
| 721 attribute DOMString paddingTop; |
| 722 attribute DOMString paddingRight; |
| 723 attribute DOMString paddingBottom; |
| 724 attribute DOMString paddingLeft; |
| 725 attribute DOMString page; |
| 726 attribute DOMString pageBreakAfter; |
| 727 attribute DOMString pageBreakBefore; |
| 728 attribute DOMString pageBreakInside; |
| 729 attribute DOMString pause; |
| 730 attribute DOMString pauseAfter; |
| 731 attribute DOMString pauseBefore; |
| 732 attribute DOMString pitch; |
| 733 attribute DOMString pitchRange; |
| 734 attribute DOMString playDuring; |
| 735 attribute DOMString position; |
| 736 attribute DOMString quotes; |
| 737 attribute DOMString richness; |
| 738 attribute DOMString right; |
| 739 attribute DOMString size; |
| 740 attribute DOMString speak; |
| 741 attribute DOMString speakHeader; |
| 742 attribute DOMString speakNumeral; |
| 743 attribute DOMString speakPunctuation; |
| 744 attribute DOMString speechRate; |
| 745 attribute DOMString stress; |
| 746 attribute DOMString tableLayout; |
| 747 attribute DOMString textAlign; |
| 748 attribute DOMString textDecoration; |
| 749 attribute DOMString textIndent; |
| 750 attribute DOMString textShadow; |
| 751 attribute DOMString textTransform; |
| 752 attribute DOMString top; |
| 753 attribute DOMString unicodeBidi; |
| 754 attribute DOMString verticalAlign; |
| 755 attribute DOMString visibility; |
| 756 attribute DOMString voiceFamily; |
| 757 attribute DOMString volume; |
| 758 attribute DOMString whiteSpace; |
| 759 attribute DOMString widows; |
| 760 attribute DOMString width; |
| 761 attribute DOMString wordSpacing; |
| 762 attribute DOMString zIndex; |
| 763 }; |
| 764 |
| 765 interface CSSStyleDeclarationValue { |
| 766 // ... |
| 767 |
| 768 // CSS Properties |
| 769 |
| 770 }; |
| 771 |
| 772 interface CSSPropertyValue { |
| 773 attribute DOMString cssText; |
| 774 }; |
| 775 |
| 776 [NoInterfaceObject] interface CSSMapValue { |
| 777 getter CSSValue (DOMString name); |
| 778 }; |
| 779 |
| 780 [NoInterfaceObject] interface CSSPropertyValueList { |
| 781 readonly attribute CSSValue[] list; |
| 782 }; |
| 783 |
| 784 [NoInterfaceObject] interface CSSComponentValue { |
| 785 readonly attribute DOMString type; |
| 786 attribute any value; |
| 787 }; |
| 788 |
| 789 [NoInterfaceObject] interface CSSStringComponentValue { |
| 790 attribute DOMString string; |
| 791 }; |
| 792 |
| 793 [NoInterfaceObject] interface CSSKeywordComponentValue { |
| 794 attribute DOMString keyword; |
| 795 }; |
| 796 |
| 797 [NoInterfaceObject] interface CSSIdentifierComponentValue { |
| 798 attribute DOMString identifier; |
| 799 }; |
| 800 |
| 801 [NoInterfaceObject] interface CSSColorComponentValue { |
| 802 attribute short red; |
| 803 attribute short green; |
| 804 attribute short blue; |
| 805 attribute float alpha; |
| 806 }; |
| 807 |
| 808 [NoInterfaceObject] interface CSSLengthComponentValue { |
| 809 attribute float em; |
| 810 attribute float ex; |
| 811 attribute float px; |
| 812 // figure out what to do with absolute lengths |
| 813 }; |
| 814 |
| 815 [NoInterfaceObject] interface CSSPercentageComponentValue { |
| 816 attribute float percent; |
| 817 }; |
| 818 |
| 819 [NoInterfaceObject] interface CSSURLComponentValue { |
| 820 attribute DOMString? url; |
| 821 }; |
| 822 |
| 823 [NoInterfaceObject] interface ElementCSSInlineStyle { |
| 824 readonly attribute CSSStyleDeclaration style; |
| 825 }; |
| 826 |
| 827 //partial interface Window { |
| 828 // CSSStyleDeclaration getComputedStyle(Element elt); |
| 829 // CSSStyleDeclaration getComputedStyle(Element elt, DOMString pseudoElt); |
| 830 //}; |
OLD | NEW |