How to use IdlInterface method in wpt

Best JavaScript code snippet using wpt

htmlelts.js

Source:htmlelts.js Github

copy

Full Screen

1//2// DO NOT EDIT.3// This file was generated by idl2domjs from src/idl/htmlelts.idl4//5//6// Interface HTMLFormControlsCollection7//8defineLazyProperty(global, "HTMLFormControlsCollection", function() {9 return idl.HTMLFormControlsCollection.publicInterface;10}, true);11defineLazyProperty(idl, "HTMLFormControlsCollection", function() {12 return new IDLInterface({13 name: "HTMLFormControlsCollection",14 superclass: idl.HTMLCollection,15 proxyFactory: HTMLFormControlsCollectionProxy,16 members: {17 namedItem: function namedItem(name) {18 return unwrap(this).namedItem(String(name));19 },20 },21 });22});23//24// Interface RadioNodeList25//26defineLazyProperty(global, "RadioNodeList", function() {27 return idl.RadioNodeList.publicInterface;28}, true);29defineLazyProperty(idl, "RadioNodeList", function() {30 return new IDLInterface({31 name: "RadioNodeList",32 superclass: idl.NodeList,33 members: {34 get value() {35 return unwrap(this).value;36 },37 set value(newval) {38 unwrap(this).value = String(newval);39 },40 },41 });42});43//44// Interface HTMLOptionsCollection45//46defineLazyProperty(global, "HTMLOptionsCollection", function() {47 return idl.HTMLOptionsCollection.publicInterface;48}, true);49defineLazyProperty(idl, "HTMLOptionsCollection", function() {50 return new IDLInterface({51 name: "HTMLOptionsCollection",52 superclass: idl.HTMLCollection,53 proxyFactory: HTMLOptionsCollectionProxy,54 members: {55 get length() {56 return unwrap(this).length;57 },58 set length(newval) {59 unwrap(this).length = toULong(newval);60 },61 namedItem: function namedItem(name) {62 return unwrap(this).namedItem(String(name));63 },64 remove: function remove(index) {65 unwrap(this).remove(toLong(index));66 },67 get selectedIndex() {68 return unwrap(this).selectedIndex;69 },70 set selectedIndex(newval) {71 unwrap(this).selectedIndex = toLong(newval);72 },73 },74 });75});76//77// Interface HTMLPropertiesCollection78//79defineLazyProperty(global, "HTMLPropertiesCollection", function() {80 return idl.HTMLPropertiesCollection.publicInterface;81}, true);82defineLazyProperty(idl, "HTMLPropertiesCollection", function() {83 return new IDLInterface({84 name: "HTMLPropertiesCollection",85 superclass: idl.HTMLCollection,86 proxyFactory: HTMLPropertiesCollectionProxy,87 members: {88 namedItem: function namedItem(name) {89 return wrap(unwrap(this).namedItem(String(name)));90 },91 get names() {92 return wrap(unwrap(this).names);93 },94 },95 });96});97//98// Interface PropertyNodeList99//100defineLazyProperty(global, "PropertyNodeList", function() {101 return idl.PropertyNodeList.publicInterface;102}, true);103defineLazyProperty(idl, "PropertyNodeList", function() {104 return new IDLInterface({105 name: "PropertyNodeList",106 superclass: idl.NodeList,107 members: {108 getValues: function getValues() {109 return wrap(unwrap(this).getValues());110 },111 },112 });113});114//115// Interface DOMStringMap116//117defineLazyProperty(global, "DOMStringMap", function() {118 return idl.DOMStringMap.publicInterface;119}, true);120defineLazyProperty(idl, "DOMStringMap", function() {121 return new IDLInterface({122 name: "DOMStringMap",123 proxyFactory: DOMStringMapProxy,124 members: {125 },126 });127});128//129// Interface DOMElementMap130//131defineLazyProperty(global, "DOMElementMap", function() {132 return idl.DOMElementMap.publicInterface;133}, true);134defineLazyProperty(idl, "DOMElementMap", function() {135 return new IDLInterface({136 name: "DOMElementMap",137 proxyFactory: DOMElementMapProxy,138 members: {139 },140 });141});142//143// Interface CSSStyleDeclaration144//145defineLazyProperty(global, "CSSStyleDeclaration", function() {146 return idl.CSSStyleDeclaration.publicInterface;147}, true);148defineLazyProperty(idl, "CSSStyleDeclaration", function() {149 return new IDLInterface({150 name: "CSSStyleDeclaration",151 members: {152 get cssText() {153 return unwrap(this).cssText;154 },155 set cssText(newval) {156 unwrap(this).cssText = String(newval);157 },158 get length() {159 return unwrap(this).length;160 },161 item: function item(index) {162 return unwrap(this).item(toULong(index));163 },164 getPropertyValue: function getPropertyValue(property) {165 return unwrap(this).getPropertyValue(String(property));166 },167 getPropertyPriority: function getPropertyPriority(property) {168 return unwrap(this).getPropertyPriority(String(property));169 },170 setProperty: function setProperty(171 property,172 value,173 priority)174 {175 unwrap(this).setProperty(176 String(property),177 String(value),178 OptionalString(priority));179 },180 removeProperty: function removeProperty(property) {181 return unwrap(this).removeProperty(String(property));182 },183 get background() {184 return unwrap(this).background;185 },186 set background(newval) {187 unwrap(this).background = String(newval);188 },189 get backgroundAttachment() {190 return unwrap(this).backgroundAttachment;191 },192 set backgroundAttachment(newval) {193 unwrap(this).backgroundAttachment = String(newval);194 },195 get backgroundColor() {196 return unwrap(this).backgroundColor;197 },198 set backgroundColor(newval) {199 unwrap(this).backgroundColor = String(newval);200 },201 get backgroundImage() {202 return unwrap(this).backgroundImage;203 },204 set backgroundImage(newval) {205 unwrap(this).backgroundImage = String(newval);206 },207 get backgroundPosition() {208 return unwrap(this).backgroundPosition;209 },210 set backgroundPosition(newval) {211 unwrap(this).backgroundPosition = String(newval);212 },213 get backgroundRepeat() {214 return unwrap(this).backgroundRepeat;215 },216 set backgroundRepeat(newval) {217 unwrap(this).backgroundRepeat = String(newval);218 },219 get border() {220 return unwrap(this).border;221 },222 set border(newval) {223 unwrap(this).border = String(newval);224 },225 get borderCollapse() {226 return unwrap(this).borderCollapse;227 },228 set borderCollapse(newval) {229 unwrap(this).borderCollapse = String(newval);230 },231 get borderColor() {232 return unwrap(this).borderColor;233 },234 set borderColor(newval) {235 unwrap(this).borderColor = String(newval);236 },237 get borderSpacing() {238 return unwrap(this).borderSpacing;239 },240 set borderSpacing(newval) {241 unwrap(this).borderSpacing = String(newval);242 },243 get borderStyle() {244 return unwrap(this).borderStyle;245 },246 set borderStyle(newval) {247 unwrap(this).borderStyle = String(newval);248 },249 get borderTop() {250 return unwrap(this).borderTop;251 },252 set borderTop(newval) {253 unwrap(this).borderTop = String(newval);254 },255 get borderRight() {256 return unwrap(this).borderRight;257 },258 set borderRight(newval) {259 unwrap(this).borderRight = String(newval);260 },261 get borderBottom() {262 return unwrap(this).borderBottom;263 },264 set borderBottom(newval) {265 unwrap(this).borderBottom = String(newval);266 },267 get borderLeft() {268 return unwrap(this).borderLeft;269 },270 set borderLeft(newval) {271 unwrap(this).borderLeft = String(newval);272 },273 get borderTopColor() {274 return unwrap(this).borderTopColor;275 },276 set borderTopColor(newval) {277 unwrap(this).borderTopColor = String(newval);278 },279 get borderRightColor() {280 return unwrap(this).borderRightColor;281 },282 set borderRightColor(newval) {283 unwrap(this).borderRightColor = String(newval);284 },285 get borderBottomColor() {286 return unwrap(this).borderBottomColor;287 },288 set borderBottomColor(newval) {289 unwrap(this).borderBottomColor = String(newval);290 },291 get borderLeftColor() {292 return unwrap(this).borderLeftColor;293 },294 set borderLeftColor(newval) {295 unwrap(this).borderLeftColor = String(newval);296 },297 get borderTopStyle() {298 return unwrap(this).borderTopStyle;299 },300 set borderTopStyle(newval) {301 unwrap(this).borderTopStyle = String(newval);302 },303 get borderRightStyle() {304 return unwrap(this).borderRightStyle;305 },306 set borderRightStyle(newval) {307 unwrap(this).borderRightStyle = String(newval);308 },309 get borderBottomStyle() {310 return unwrap(this).borderBottomStyle;311 },312 set borderBottomStyle(newval) {313 unwrap(this).borderBottomStyle = String(newval);314 },315 get borderLeftStyle() {316 return unwrap(this).borderLeftStyle;317 },318 set borderLeftStyle(newval) {319 unwrap(this).borderLeftStyle = String(newval);320 },321 get borderTopWidth() {322 return unwrap(this).borderTopWidth;323 },324 set borderTopWidth(newval) {325 unwrap(this).borderTopWidth = String(newval);326 },327 get borderRightWidth() {328 return unwrap(this).borderRightWidth;329 },330 set borderRightWidth(newval) {331 unwrap(this).borderRightWidth = String(newval);332 },333 get borderBottomWidth() {334 return unwrap(this).borderBottomWidth;335 },336 set borderBottomWidth(newval) {337 unwrap(this).borderBottomWidth = String(newval);338 },339 get borderLeftWidth() {340 return unwrap(this).borderLeftWidth;341 },342 set borderLeftWidth(newval) {343 unwrap(this).borderLeftWidth = String(newval);344 },345 get borderWidth() {346 return unwrap(this).borderWidth;347 },348 set borderWidth(newval) {349 unwrap(this).borderWidth = String(newval);350 },351 get bottom() {352 return unwrap(this).bottom;353 },354 set bottom(newval) {355 unwrap(this).bottom = String(newval);356 },357 get captionSide() {358 return unwrap(this).captionSide;359 },360 set captionSide(newval) {361 unwrap(this).captionSide = String(newval);362 },363 get clear() {364 return unwrap(this).clear;365 },366 set clear(newval) {367 unwrap(this).clear = String(newval);368 },369 get clip() {370 return unwrap(this).clip;371 },372 set clip(newval) {373 unwrap(this).clip = String(newval);374 },375 get color() {376 return unwrap(this).color;377 },378 set color(newval) {379 unwrap(this).color = String(newval);380 },381 get content() {382 return unwrap(this).content;383 },384 set content(newval) {385 unwrap(this).content = String(newval);386 },387 get counterIncrement() {388 return unwrap(this).counterIncrement;389 },390 set counterIncrement(newval) {391 unwrap(this).counterIncrement = String(newval);392 },393 get counterReset() {394 return unwrap(this).counterReset;395 },396 set counterReset(newval) {397 unwrap(this).counterReset = String(newval);398 },399 get cursor() {400 return unwrap(this).cursor;401 },402 set cursor(newval) {403 unwrap(this).cursor = String(newval);404 },405 get direction() {406 return unwrap(this).direction;407 },408 set direction(newval) {409 unwrap(this).direction = String(newval);410 },411 get display() {412 return unwrap(this).display;413 },414 set display(newval) {415 unwrap(this).display = String(newval);416 },417 get emptyCells() {418 return unwrap(this).emptyCells;419 },420 set emptyCells(newval) {421 unwrap(this).emptyCells = String(newval);422 },423 get cssFloat() {424 return unwrap(this).cssFloat;425 },426 set cssFloat(newval) {427 unwrap(this).cssFloat = String(newval);428 },429 get font() {430 return unwrap(this).font;431 },432 set font(newval) {433 unwrap(this).font = String(newval);434 },435 get fontFamily() {436 return unwrap(this).fontFamily;437 },438 set fontFamily(newval) {439 unwrap(this).fontFamily = String(newval);440 },441 get fontSize() {442 return unwrap(this).fontSize;443 },444 set fontSize(newval) {445 unwrap(this).fontSize = String(newval);446 },447 get fontSizeAdjust() {448 return unwrap(this).fontSizeAdjust;449 },450 set fontSizeAdjust(newval) {451 unwrap(this).fontSizeAdjust = String(newval);452 },453 get fontStretch() {454 return unwrap(this).fontStretch;455 },456 set fontStretch(newval) {457 unwrap(this).fontStretch = String(newval);458 },459 get fontStyle() {460 return unwrap(this).fontStyle;461 },462 set fontStyle(newval) {463 unwrap(this).fontStyle = String(newval);464 },465 get fontVariant() {466 return unwrap(this).fontVariant;467 },468 set fontVariant(newval) {469 unwrap(this).fontVariant = String(newval);470 },471 get fontWeight() {472 return unwrap(this).fontWeight;473 },474 set fontWeight(newval) {475 unwrap(this).fontWeight = String(newval);476 },477 get height() {478 return unwrap(this).height;479 },480 set height(newval) {481 unwrap(this).height = String(newval);482 },483 get left() {484 return unwrap(this).left;485 },486 set left(newval) {487 unwrap(this).left = String(newval);488 },489 get letterSpacing() {490 return unwrap(this).letterSpacing;491 },492 set letterSpacing(newval) {493 unwrap(this).letterSpacing = String(newval);494 },495 get lineHeight() {496 return unwrap(this).lineHeight;497 },498 set lineHeight(newval) {499 unwrap(this).lineHeight = String(newval);500 },501 get listStyle() {502 return unwrap(this).listStyle;503 },504 set listStyle(newval) {505 unwrap(this).listStyle = String(newval);506 },507 get listStyleImage() {508 return unwrap(this).listStyleImage;509 },510 set listStyleImage(newval) {511 unwrap(this).listStyleImage = String(newval);512 },513 get listStylePosition() {514 return unwrap(this).listStylePosition;515 },516 set listStylePosition(newval) {517 unwrap(this).listStylePosition = String(newval);518 },519 get listStyleType() {520 return unwrap(this).listStyleType;521 },522 set listStyleType(newval) {523 unwrap(this).listStyleType = String(newval);524 },525 get margin() {526 return unwrap(this).margin;527 },528 set margin(newval) {529 unwrap(this).margin = String(newval);530 },531 get marginTop() {532 return unwrap(this).marginTop;533 },534 set marginTop(newval) {535 unwrap(this).marginTop = String(newval);536 },537 get marginRight() {538 return unwrap(this).marginRight;539 },540 set marginRight(newval) {541 unwrap(this).marginRight = String(newval);542 },543 get marginBottom() {544 return unwrap(this).marginBottom;545 },546 set marginBottom(newval) {547 unwrap(this).marginBottom = String(newval);548 },549 get marginLeft() {550 return unwrap(this).marginLeft;551 },552 set marginLeft(newval) {553 unwrap(this).marginLeft = String(newval);554 },555 get markerOffset() {556 return unwrap(this).markerOffset;557 },558 set markerOffset(newval) {559 unwrap(this).markerOffset = String(newval);560 },561 get marks() {562 return unwrap(this).marks;563 },564 set marks(newval) {565 unwrap(this).marks = String(newval);566 },567 get maxHeight() {568 return unwrap(this).maxHeight;569 },570 set maxHeight(newval) {571 unwrap(this).maxHeight = String(newval);572 },573 get maxWidth() {574 return unwrap(this).maxWidth;575 },576 set maxWidth(newval) {577 unwrap(this).maxWidth = String(newval);578 },579 get minHeight() {580 return unwrap(this).minHeight;581 },582 set minHeight(newval) {583 unwrap(this).minHeight = String(newval);584 },585 get minWidth() {586 return unwrap(this).minWidth;587 },588 set minWidth(newval) {589 unwrap(this).minWidth = String(newval);590 },591 get opacity() {592 return unwrap(this).opacity;593 },594 set opacity(newval) {595 unwrap(this).opacity = String(newval);596 },597 get orphans() {598 return unwrap(this).orphans;599 },600 set orphans(newval) {601 unwrap(this).orphans = String(newval);602 },603 get outline() {604 return unwrap(this).outline;605 },606 set outline(newval) {607 unwrap(this).outline = String(newval);608 },609 get outlineColor() {610 return unwrap(this).outlineColor;611 },612 set outlineColor(newval) {613 unwrap(this).outlineColor = String(newval);614 },615 get outlineStyle() {616 return unwrap(this).outlineStyle;617 },618 set outlineStyle(newval) {619 unwrap(this).outlineStyle = String(newval);620 },621 get outlineWidth() {622 return unwrap(this).outlineWidth;623 },624 set outlineWidth(newval) {625 unwrap(this).outlineWidth = String(newval);626 },627 get overflow() {628 return unwrap(this).overflow;629 },630 set overflow(newval) {631 unwrap(this).overflow = String(newval);632 },633 get padding() {634 return unwrap(this).padding;635 },636 set padding(newval) {637 unwrap(this).padding = String(newval);638 },639 get paddingTop() {640 return unwrap(this).paddingTop;641 },642 set paddingTop(newval) {643 unwrap(this).paddingTop = String(newval);644 },645 get paddingRight() {646 return unwrap(this).paddingRight;647 },648 set paddingRight(newval) {649 unwrap(this).paddingRight = String(newval);650 },651 get paddingBottom() {652 return unwrap(this).paddingBottom;653 },654 set paddingBottom(newval) {655 unwrap(this).paddingBottom = String(newval);656 },657 get paddingLeft() {658 return unwrap(this).paddingLeft;659 },660 set paddingLeft(newval) {661 unwrap(this).paddingLeft = String(newval);662 },663 get page() {664 return unwrap(this).page;665 },666 set page(newval) {667 unwrap(this).page = String(newval);668 },669 get pageBreakAfter() {670 return unwrap(this).pageBreakAfter;671 },672 set pageBreakAfter(newval) {673 unwrap(this).pageBreakAfter = String(newval);674 },675 get pageBreakBefore() {676 return unwrap(this).pageBreakBefore;677 },678 set pageBreakBefore(newval) {679 unwrap(this).pageBreakBefore = String(newval);680 },681 get pageBreakInside() {682 return unwrap(this).pageBreakInside;683 },684 set pageBreakInside(newval) {685 unwrap(this).pageBreakInside = String(newval);686 },687 get position() {688 return unwrap(this).position;689 },690 set position(newval) {691 unwrap(this).position = String(newval);692 },693 get quotes() {694 return unwrap(this).quotes;695 },696 set quotes(newval) {697 unwrap(this).quotes = String(newval);698 },699 get right() {700 return unwrap(this).right;701 },702 set right(newval) {703 unwrap(this).right = String(newval);704 },705 get size() {706 return unwrap(this).size;707 },708 set size(newval) {709 unwrap(this).size = String(newval);710 },711 get tableLayout() {712 return unwrap(this).tableLayout;713 },714 set tableLayout(newval) {715 unwrap(this).tableLayout = String(newval);716 },717 get textAlign() {718 return unwrap(this).textAlign;719 },720 set textAlign(newval) {721 unwrap(this).textAlign = String(newval);722 },723 get textDecoration() {724 return unwrap(this).textDecoration;725 },726 set textDecoration(newval) {727 unwrap(this).textDecoration = String(newval);728 },729 get textIndent() {730 return unwrap(this).textIndent;731 },732 set textIndent(newval) {733 unwrap(this).textIndent = String(newval);734 },735 get textShadow() {736 return unwrap(this).textShadow;737 },738 set textShadow(newval) {739 unwrap(this).textShadow = String(newval);740 },741 get textTransform() {742 return unwrap(this).textTransform;743 },744 set textTransform(newval) {745 unwrap(this).textTransform = String(newval);746 },747 get top() {748 return unwrap(this).top;749 },750 set top(newval) {751 unwrap(this).top = String(newval);752 },753 get unicodeBidi() {754 return unwrap(this).unicodeBidi;755 },756 set unicodeBidi(newval) {757 unwrap(this).unicodeBidi = String(newval);758 },759 get verticalAlign() {760 return unwrap(this).verticalAlign;761 },762 set verticalAlign(newval) {763 unwrap(this).verticalAlign = String(newval);764 },765 get visibility() {766 return unwrap(this).visibility;767 },768 set visibility(newval) {769 unwrap(this).visibility = String(newval);770 },771 get whiteSpace() {772 return unwrap(this).whiteSpace;773 },774 set whiteSpace(newval) {775 unwrap(this).whiteSpace = String(newval);776 },777 get widows() {778 return unwrap(this).widows;779 },780 set widows(newval) {781 unwrap(this).widows = String(newval);782 },783 get width() {784 return unwrap(this).width;785 },786 set width(newval) {787 unwrap(this).width = String(newval);788 },789 get wordSpacing() {790 return unwrap(this).wordSpacing;791 },792 set wordSpacing(newval) {793 unwrap(this).wordSpacing = String(newval);794 },795 get zIndex() {796 return unwrap(this).zIndex;797 },798 set zIndex(newval) {799 unwrap(this).zIndex = String(newval);800 },801 },802 });803});804//805// Interface HTMLElement806//807defineLazyProperty(global, "HTMLElement", function() {808 return idl.HTMLElement.publicInterface;809}, true);810defineLazyProperty(idl, "HTMLElement", function() {811 return new IDLInterface({812 name: "HTMLElement",813 superclass: idl.Element,814 members: {815 get innerHTML() {816 return unwrap(this).innerHTML;817 },818 set innerHTML(newval) {819 unwrap(this).innerHTML = String(newval);820 },821 get outerHTML() {822 return unwrap(this).outerHTML;823 },824 set outerHTML(newval) {825 unwrap(this).outerHTML = String(newval);826 },827 insertAdjacentHTML: function insertAdjacentHTML(828 position,829 text)830 {831 unwrap(this).insertAdjacentHTML(832 String(position),833 String(text));834 },835 get id() {836 return unwrap(this).id;837 },838 set id(newval) {839 unwrap(this).id = String(newval);840 },841 get title() {842 return unwrap(this).title;843 },844 set title(newval) {845 unwrap(this).title = String(newval);846 },847 get lang() {848 return unwrap(this).lang;849 },850 set lang(newval) {851 unwrap(this).lang = String(newval);852 },853 get dir() {854 return unwrap(this).dir;855 },856 set dir(newval) {857 unwrap(this).dir = String(newval);858 },859 get className() {860 return unwrap(this).className;861 },862 set className(newval) {863 unwrap(this).className = String(newval);864 },865 get classList() {866 return wrap(unwrap(this).classList);867 },868 get dataset() {869 return wrap(unwrap(this).dataset);870 },871 get itemScope() {872 return unwrap(this).itemScope;873 },874 set itemScope(newval) {875 unwrap(this).itemScope = Boolean(newval);876 },877 get itemType() {878 return unwrap(this).itemType;879 },880 set itemType(newval) {881 unwrap(this).itemType = String(newval);882 },883 get itemId() {884 return unwrap(this).itemId;885 },886 set itemId(newval) {887 unwrap(this).itemId = String(newval);888 },889 get itemRef() {890 return wrap(unwrap(this).itemRef);891 },892 get itemProp() {893 return wrap(unwrap(this).itemProp);894 },895 get properties() {896 return wrap(unwrap(this).properties);897 },898 get itemValue() {899 return unwrap(this).itemValue;900 },901 set itemValue(newval) {902 unwrap(this).itemValue = newval;903 },904 get hidden() {905 return unwrap(this).hidden;906 },907 set hidden(newval) {908 unwrap(this).hidden = Boolean(newval);909 },910 click: function click() {911 unwrap(this).click();912 },913 get tabIndex() {914 return unwrap(this).tabIndex;915 },916 set tabIndex(newval) {917 unwrap(this).tabIndex = toLong(newval);918 },919 focus: function focus() {920 unwrap(this).focus();921 },922 blur: function blur() {923 unwrap(this).blur();924 },925 get accessKey() {926 return unwrap(this).accessKey;927 },928 set accessKey(newval) {929 unwrap(this).accessKey = String(newval);930 },931 get accessKeyLabel() {932 return unwrap(this).accessKeyLabel;933 },934 get draggable() {935 return unwrap(this).draggable;936 },937 set draggable(newval) {938 unwrap(this).draggable = Boolean(newval);939 },940 get dropzone() {941 return wrap(unwrap(this).dropzone);942 },943 get contentEditable() {944 return unwrap(this).contentEditable;945 },946 set contentEditable(newval) {947 unwrap(this).contentEditable = String(newval);948 },949 get isContentEditable() {950 return unwrap(this).isContentEditable;951 },952 get contextMenu() {953 return wrap(unwrap(this).contextMenu);954 },955 set contextMenu(newval) {956 unwrap(this).contextMenu = unwrapOrNull(newval);957 },958 get spellcheck() {959 return unwrap(this).spellcheck;960 },961 set spellcheck(newval) {962 unwrap(this).spellcheck = Boolean(newval);963 },964 get commandType() {965 return unwrap(this).commandType;966 },967 get commandLabel() {968 return unwrap(this).commandLabel;969 },970 get commandIcon() {971 return unwrap(this).commandIcon;972 },973 get commandHidden() {974 return unwrap(this).commandHidden;975 },976 get commandDisabled() {977 return unwrap(this).commandDisabled;978 },979 get commandChecked() {980 return unwrap(this).commandChecked;981 },982 get style() {983 return wrap(unwrap(this).style);984 },985 get onabort() {986 return unwrap(this).onabort;987 },988 set onabort(newval) {989 unwrap(this).onabort = toCallbackOrNull(newval);990 },991 get onblur() {992 return unwrap(this).onblur;993 },994 set onblur(newval) {995 unwrap(this).onblur = toCallbackOrNull(newval);996 },997 get oncanplay() {998 return unwrap(this).oncanplay;999 },1000 set oncanplay(newval) {1001 unwrap(this).oncanplay = toCallbackOrNull(newval);1002 },1003 get oncanplaythrough() {1004 return unwrap(this).oncanplaythrough;1005 },1006 set oncanplaythrough(newval) {1007 unwrap(this).oncanplaythrough = toCallbackOrNull(newval);1008 },1009 get onchange() {1010 return unwrap(this).onchange;1011 },1012 set onchange(newval) {1013 unwrap(this).onchange = toCallbackOrNull(newval);1014 },1015 get onclick() {1016 return unwrap(this).onclick;1017 },1018 set onclick(newval) {1019 unwrap(this).onclick = toCallbackOrNull(newval);1020 },1021 get oncontextmenu() {1022 return unwrap(this).oncontextmenu;1023 },1024 set oncontextmenu(newval) {1025 unwrap(this).oncontextmenu = toCallbackOrNull(newval);1026 },1027 get oncuechange() {1028 return unwrap(this).oncuechange;1029 },1030 set oncuechange(newval) {1031 unwrap(this).oncuechange = toCallbackOrNull(newval);1032 },1033 get ondblclick() {1034 return unwrap(this).ondblclick;1035 },1036 set ondblclick(newval) {1037 unwrap(this).ondblclick = toCallbackOrNull(newval);1038 },1039 get ondrag() {1040 return unwrap(this).ondrag;1041 },1042 set ondrag(newval) {1043 unwrap(this).ondrag = toCallbackOrNull(newval);1044 },1045 get ondragend() {1046 return unwrap(this).ondragend;1047 },1048 set ondragend(newval) {1049 unwrap(this).ondragend = toCallbackOrNull(newval);1050 },1051 get ondragenter() {1052 return unwrap(this).ondragenter;1053 },1054 set ondragenter(newval) {1055 unwrap(this).ondragenter = toCallbackOrNull(newval);1056 },1057 get ondragleave() {1058 return unwrap(this).ondragleave;1059 },1060 set ondragleave(newval) {1061 unwrap(this).ondragleave = toCallbackOrNull(newval);1062 },1063 get ondragover() {1064 return unwrap(this).ondragover;1065 },1066 set ondragover(newval) {1067 unwrap(this).ondragover = toCallbackOrNull(newval);1068 },1069 get ondragstart() {1070 return unwrap(this).ondragstart;1071 },1072 set ondragstart(newval) {1073 unwrap(this).ondragstart = toCallbackOrNull(newval);1074 },1075 get ondrop() {1076 return unwrap(this).ondrop;1077 },1078 set ondrop(newval) {1079 unwrap(this).ondrop = toCallbackOrNull(newval);1080 },1081 get ondurationchange() {1082 return unwrap(this).ondurationchange;1083 },1084 set ondurationchange(newval) {1085 unwrap(this).ondurationchange = toCallbackOrNull(newval);1086 },1087 get onemptied() {1088 return unwrap(this).onemptied;1089 },1090 set onemptied(newval) {1091 unwrap(this).onemptied = toCallbackOrNull(newval);1092 },1093 get onended() {1094 return unwrap(this).onended;1095 },1096 set onended(newval) {1097 unwrap(this).onended = toCallbackOrNull(newval);1098 },1099 get onerror() {1100 return unwrap(this).onerror;1101 },1102 set onerror(newval) {1103 unwrap(this).onerror = toCallbackOrNull(newval);1104 },1105 get onfocus() {1106 return unwrap(this).onfocus;1107 },1108 set onfocus(newval) {1109 unwrap(this).onfocus = toCallbackOrNull(newval);1110 },1111 get oninput() {1112 return unwrap(this).oninput;1113 },1114 set oninput(newval) {1115 unwrap(this).oninput = toCallbackOrNull(newval);1116 },1117 get oninvalid() {1118 return unwrap(this).oninvalid;1119 },1120 set oninvalid(newval) {1121 unwrap(this).oninvalid = toCallbackOrNull(newval);1122 },1123 get onkeydown() {1124 return unwrap(this).onkeydown;1125 },1126 set onkeydown(newval) {1127 unwrap(this).onkeydown = toCallbackOrNull(newval);1128 },1129 get onkeypress() {1130 return unwrap(this).onkeypress;1131 },1132 set onkeypress(newval) {1133 unwrap(this).onkeypress = toCallbackOrNull(newval);1134 },1135 get onkeyup() {1136 return unwrap(this).onkeyup;1137 },1138 set onkeyup(newval) {1139 unwrap(this).onkeyup = toCallbackOrNull(newval);1140 },1141 get onload() {1142 return unwrap(this).onload;1143 },1144 set onload(newval) {1145 unwrap(this).onload = toCallbackOrNull(newval);1146 },1147 get onloadeddata() {1148 return unwrap(this).onloadeddata;1149 },1150 set onloadeddata(newval) {1151 unwrap(this).onloadeddata = toCallbackOrNull(newval);1152 },1153 get onloadedmetadata() {1154 return unwrap(this).onloadedmetadata;1155 },1156 set onloadedmetadata(newval) {1157 unwrap(this).onloadedmetadata = toCallbackOrNull(newval);1158 },1159 get onloadstart() {1160 return unwrap(this).onloadstart;1161 },1162 set onloadstart(newval) {1163 unwrap(this).onloadstart = toCallbackOrNull(newval);1164 },1165 get onmousedown() {1166 return unwrap(this).onmousedown;1167 },1168 set onmousedown(newval) {1169 unwrap(this).onmousedown = toCallbackOrNull(newval);1170 },1171 get onmousemove() {1172 return unwrap(this).onmousemove;1173 },1174 set onmousemove(newval) {1175 unwrap(this).onmousemove = toCallbackOrNull(newval);1176 },1177 get onmouseout() {1178 return unwrap(this).onmouseout;1179 },1180 set onmouseout(newval) {1181 unwrap(this).onmouseout = toCallbackOrNull(newval);1182 },1183 get onmouseover() {1184 return unwrap(this).onmouseover;1185 },1186 set onmouseover(newval) {1187 unwrap(this).onmouseover = toCallbackOrNull(newval);1188 },1189 get onmouseup() {1190 return unwrap(this).onmouseup;1191 },1192 set onmouseup(newval) {1193 unwrap(this).onmouseup = toCallbackOrNull(newval);1194 },1195 get onmousewheel() {1196 return unwrap(this).onmousewheel;1197 },1198 set onmousewheel(newval) {1199 unwrap(this).onmousewheel = toCallbackOrNull(newval);1200 },1201 get onpause() {1202 return unwrap(this).onpause;1203 },1204 set onpause(newval) {1205 unwrap(this).onpause = toCallbackOrNull(newval);1206 },1207 get onplay() {1208 return unwrap(this).onplay;1209 },1210 set onplay(newval) {1211 unwrap(this).onplay = toCallbackOrNull(newval);1212 },1213 get onplaying() {1214 return unwrap(this).onplaying;1215 },1216 set onplaying(newval) {1217 unwrap(this).onplaying = toCallbackOrNull(newval);1218 },1219 get onprogress() {1220 return unwrap(this).onprogress;1221 },1222 set onprogress(newval) {1223 unwrap(this).onprogress = toCallbackOrNull(newval);1224 },1225 get onratechange() {1226 return unwrap(this).onratechange;1227 },1228 set onratechange(newval) {1229 unwrap(this).onratechange = toCallbackOrNull(newval);1230 },1231 get onreadystatechange() {1232 return unwrap(this).onreadystatechange;1233 },1234 set onreadystatechange(newval) {1235 unwrap(this).onreadystatechange = toCallbackOrNull(newval);1236 },1237 get onreset() {1238 return unwrap(this).onreset;1239 },1240 set onreset(newval) {1241 unwrap(this).onreset = toCallbackOrNull(newval);1242 },1243 get onscroll() {1244 return unwrap(this).onscroll;1245 },1246 set onscroll(newval) {1247 unwrap(this).onscroll = toCallbackOrNull(newval);1248 },1249 get onseeked() {1250 return unwrap(this).onseeked;1251 },1252 set onseeked(newval) {1253 unwrap(this).onseeked = toCallbackOrNull(newval);1254 },1255 get onseeking() {1256 return unwrap(this).onseeking;1257 },1258 set onseeking(newval) {1259 unwrap(this).onseeking = toCallbackOrNull(newval);1260 },1261 get onselect() {1262 return unwrap(this).onselect;1263 },1264 set onselect(newval) {1265 unwrap(this).onselect = toCallbackOrNull(newval);1266 },1267 get onshow() {1268 return unwrap(this).onshow;1269 },1270 set onshow(newval) {1271 unwrap(this).onshow = toCallbackOrNull(newval);1272 },1273 get onstalled() {1274 return unwrap(this).onstalled;1275 },1276 set onstalled(newval) {1277 unwrap(this).onstalled = toCallbackOrNull(newval);1278 },1279 get onsubmit() {1280 return unwrap(this).onsubmit;1281 },1282 set onsubmit(newval) {1283 unwrap(this).onsubmit = toCallbackOrNull(newval);1284 },1285 get onsuspend() {1286 return unwrap(this).onsuspend;1287 },1288 set onsuspend(newval) {1289 unwrap(this).onsuspend = toCallbackOrNull(newval);1290 },1291 get ontimeupdate() {1292 return unwrap(this).ontimeupdate;1293 },1294 set ontimeupdate(newval) {1295 unwrap(this).ontimeupdate = toCallbackOrNull(newval);1296 },1297 get onvolumechange() {1298 return unwrap(this).onvolumechange;1299 },1300 set onvolumechange(newval) {1301 unwrap(this).onvolumechange = toCallbackOrNull(newval);1302 },1303 get onwaiting() {1304 return unwrap(this).onwaiting;1305 },1306 set onwaiting(newval) {1307 unwrap(this).onwaiting = toCallbackOrNull(newval);1308 },1309 },1310 });1311});1312//1313// Interface HTMLUnknownElement1314//1315defineLazyProperty(global, "HTMLUnknownElement", function() {1316 return idl.HTMLUnknownElement.publicInterface;1317}, true);1318defineLazyProperty(idl, "HTMLUnknownElement", function() {1319 return new IDLInterface({1320 name: "HTMLUnknownElement",1321 superclass: idl.HTMLElement,1322 members: {1323 },1324 });1325});1326//1327// Interface HTMLHtmlElement1328//1329defineLazyProperty(global, "HTMLHtmlElement", function() {1330 return idl.HTMLHtmlElement.publicInterface;1331}, true);1332defineLazyProperty(idl, "HTMLHtmlElement", function() {1333 return new IDLInterface({1334 name: "HTMLHtmlElement",1335 superclass: idl.HTMLElement,1336 members: {1337 },1338 });1339});1340//1341// Interface HTMLHeadElement1342//1343defineLazyProperty(global, "HTMLHeadElement", function() {1344 return idl.HTMLHeadElement.publicInterface;1345}, true);1346defineLazyProperty(idl, "HTMLHeadElement", function() {1347 return new IDLInterface({1348 name: "HTMLHeadElement",1349 superclass: idl.HTMLElement,1350 members: {1351 },1352 });1353});1354//1355// Interface HTMLTitleElement1356//1357defineLazyProperty(global, "HTMLTitleElement", function() {1358 return idl.HTMLTitleElement.publicInterface;1359}, true);1360defineLazyProperty(idl, "HTMLTitleElement", function() {1361 return new IDLInterface({1362 name: "HTMLTitleElement",1363 superclass: idl.HTMLElement,1364 members: {1365 get text() {1366 return unwrap(this).text;1367 },1368 set text(newval) {1369 unwrap(this).text = String(newval);1370 },1371 },1372 });1373});1374//1375// Interface HTMLBaseElement1376//1377defineLazyProperty(global, "HTMLBaseElement", function() {1378 return idl.HTMLBaseElement.publicInterface;1379}, true);1380defineLazyProperty(idl, "HTMLBaseElement", function() {1381 return new IDLInterface({1382 name: "HTMLBaseElement",1383 superclass: idl.HTMLElement,1384 members: {1385 get href() {1386 return unwrap(this).href;1387 },1388 set href(newval) {1389 unwrap(this).href = String(newval);1390 },1391 get target() {1392 return unwrap(this).target;1393 },1394 set target(newval) {1395 unwrap(this).target = String(newval);1396 },1397 },1398 });1399});1400//1401// Interface HTMLLinkElement1402//1403defineLazyProperty(global, "HTMLLinkElement", function() {1404 return idl.HTMLLinkElement.publicInterface;1405}, true);1406defineLazyProperty(idl, "HTMLLinkElement", function() {1407 return new IDLInterface({1408 name: "HTMLLinkElement",1409 superclass: idl.HTMLElement,1410 members: {1411 get disabled() {1412 return unwrap(this).disabled;1413 },1414 set disabled(newval) {1415 unwrap(this).disabled = Boolean(newval);1416 },1417 get href() {1418 return unwrap(this).href;1419 },1420 set href(newval) {1421 unwrap(this).href = String(newval);1422 },1423 get rel() {1424 return unwrap(this).rel;1425 },1426 set rel(newval) {1427 unwrap(this).rel = String(newval);1428 },1429 get relList() {1430 return wrap(unwrap(this).relList);1431 },1432 get media() {1433 return unwrap(this).media;1434 },1435 set media(newval) {1436 unwrap(this).media = String(newval);1437 },1438 get hreflang() {1439 return unwrap(this).hreflang;1440 },1441 set hreflang(newval) {1442 unwrap(this).hreflang = String(newval);1443 },1444 get type() {1445 return unwrap(this).type;1446 },1447 set type(newval) {1448 unwrap(this).type = String(newval);1449 },1450 get sizes() {1451 return wrap(unwrap(this).sizes);1452 },1453 },1454 });1455});1456//1457// Interface HTMLMetaElement1458//1459defineLazyProperty(global, "HTMLMetaElement", function() {1460 return idl.HTMLMetaElement.publicInterface;1461}, true);1462defineLazyProperty(idl, "HTMLMetaElement", function() {1463 return new IDLInterface({1464 name: "HTMLMetaElement",1465 superclass: idl.HTMLElement,1466 members: {1467 get name() {1468 return unwrap(this).name;1469 },1470 set name(newval) {1471 unwrap(this).name = String(newval);1472 },1473 get httpEquiv() {1474 return unwrap(this).httpEquiv;1475 },1476 set httpEquiv(newval) {1477 unwrap(this).httpEquiv = String(newval);1478 },1479 get content() {1480 return unwrap(this).content;1481 },1482 set content(newval) {1483 unwrap(this).content = String(newval);1484 },1485 },1486 });1487});1488//1489// Interface HTMLStyleElement1490//1491defineLazyProperty(global, "HTMLStyleElement", function() {1492 return idl.HTMLStyleElement.publicInterface;1493}, true);1494defineLazyProperty(idl, "HTMLStyleElement", function() {1495 return new IDLInterface({1496 name: "HTMLStyleElement",1497 superclass: idl.HTMLElement,1498 members: {1499 get disabled() {1500 return unwrap(this).disabled;1501 },1502 set disabled(newval) {1503 unwrap(this).disabled = Boolean(newval);1504 },1505 get media() {1506 return unwrap(this).media;1507 },1508 set media(newval) {1509 unwrap(this).media = String(newval);1510 },1511 get type() {1512 return unwrap(this).type;1513 },1514 set type(newval) {1515 unwrap(this).type = String(newval);1516 },1517 get scoped() {1518 return unwrap(this).scoped;1519 },1520 set scoped(newval) {1521 unwrap(this).scoped = Boolean(newval);1522 },1523 },1524 });1525});1526//1527// Interface HTMLScriptElement1528//1529defineLazyProperty(global, "HTMLScriptElement", function() {1530 return idl.HTMLScriptElement.publicInterface;1531}, true);1532defineLazyProperty(idl, "HTMLScriptElement", function() {1533 return new IDLInterface({1534 name: "HTMLScriptElement",1535 superclass: idl.HTMLElement,1536 members: {1537 get src() {1538 return unwrap(this).src;1539 },1540 set src(newval) {1541 unwrap(this).src = String(newval);1542 },1543 get async() {1544 return unwrap(this).async;1545 },1546 set async(newval) {1547 unwrap(this).async = Boolean(newval);1548 },1549 get defer() {1550 return unwrap(this).defer;1551 },1552 set defer(newval) {1553 unwrap(this).defer = Boolean(newval);1554 },1555 get type() {1556 return unwrap(this).type;1557 },1558 set type(newval) {1559 unwrap(this).type = String(newval);1560 },1561 get charset() {1562 return unwrap(this).charset;1563 },1564 set charset(newval) {1565 unwrap(this).charset = String(newval);1566 },1567 get text() {1568 return unwrap(this).text;1569 },1570 set text(newval) {1571 unwrap(this).text = String(newval);1572 },1573 },1574 });1575});1576//1577// Interface HTMLBodyElement1578//1579defineLazyProperty(global, "HTMLBodyElement", function() {1580 return idl.HTMLBodyElement.publicInterface;1581}, true);1582defineLazyProperty(idl, "HTMLBodyElement", function() {1583 return new IDLInterface({1584 name: "HTMLBodyElement",1585 superclass: idl.HTMLElement,1586 members: {1587 get onafterprint() {1588 return unwrap(this).onafterprint;1589 },1590 set onafterprint(newval) {1591 unwrap(this).onafterprint = toCallbackOrNull(newval);1592 },1593 get onbeforeprint() {1594 return unwrap(this).onbeforeprint;1595 },1596 set onbeforeprint(newval) {1597 unwrap(this).onbeforeprint = toCallbackOrNull(newval);1598 },1599 get onbeforeunload() {1600 return unwrap(this).onbeforeunload;1601 },1602 set onbeforeunload(newval) {1603 unwrap(this).onbeforeunload = toCallbackOrNull(newval);1604 },1605 get onblur() {1606 return unwrap(this).onblur;1607 },1608 set onblur(newval) {1609 unwrap(this).onblur = toCallbackOrNull(newval);1610 },1611 get onerror() {1612 return unwrap(this).onerror;1613 },1614 set onerror(newval) {1615 unwrap(this).onerror = toCallbackOrNull(newval);1616 },1617 get onfocus() {1618 return unwrap(this).onfocus;1619 },1620 set onfocus(newval) {1621 unwrap(this).onfocus = toCallbackOrNull(newval);1622 },1623 get onhashchange() {1624 return unwrap(this).onhashchange;1625 },1626 set onhashchange(newval) {1627 unwrap(this).onhashchange = toCallbackOrNull(newval);1628 },1629 get onload() {1630 return unwrap(this).onload;1631 },1632 set onload(newval) {1633 unwrap(this).onload = toCallbackOrNull(newval);1634 },1635 get onmessage() {1636 return unwrap(this).onmessage;1637 },1638 set onmessage(newval) {1639 unwrap(this).onmessage = toCallbackOrNull(newval);1640 },1641 get onoffline() {1642 return unwrap(this).onoffline;1643 },1644 set onoffline(newval) {1645 unwrap(this).onoffline = toCallbackOrNull(newval);1646 },1647 get ononline() {1648 return unwrap(this).ononline;1649 },1650 set ononline(newval) {1651 unwrap(this).ononline = toCallbackOrNull(newval);1652 },1653 get onpopstate() {1654 return unwrap(this).onpopstate;1655 },1656 set onpopstate(newval) {1657 unwrap(this).onpopstate = toCallbackOrNull(newval);1658 },1659 get onpagehide() {1660 return unwrap(this).onpagehide;1661 },1662 set onpagehide(newval) {1663 unwrap(this).onpagehide = toCallbackOrNull(newval);1664 },1665 get onpageshow() {1666 return unwrap(this).onpageshow;1667 },1668 set onpageshow(newval) {1669 unwrap(this).onpageshow = toCallbackOrNull(newval);1670 },1671 get onredo() {1672 return unwrap(this).onredo;1673 },1674 set onredo(newval) {1675 unwrap(this).onredo = toCallbackOrNull(newval);1676 },1677 get onresize() {1678 return unwrap(this).onresize;1679 },1680 set onresize(newval) {1681 unwrap(this).onresize = toCallbackOrNull(newval);1682 },1683 get onscroll() {1684 return unwrap(this).onscroll;1685 },1686 set onscroll(newval) {1687 unwrap(this).onscroll = toCallbackOrNull(newval);1688 },1689 get onstorage() {1690 return unwrap(this).onstorage;1691 },1692 set onstorage(newval) {1693 unwrap(this).onstorage = toCallbackOrNull(newval);1694 },1695 get onundo() {1696 return unwrap(this).onundo;1697 },1698 set onundo(newval) {1699 unwrap(this).onundo = toCallbackOrNull(newval);1700 },1701 get onunload() {1702 return unwrap(this).onunload;1703 },1704 set onunload(newval) {1705 unwrap(this).onunload = toCallbackOrNull(newval);1706 },1707 },1708 });1709});1710//1711// Interface HTMLHeadingElement1712//1713defineLazyProperty(global, "HTMLHeadingElement", function() {1714 return idl.HTMLHeadingElement.publicInterface;1715}, true);1716defineLazyProperty(idl, "HTMLHeadingElement", function() {1717 return new IDLInterface({1718 name: "HTMLHeadingElement",1719 superclass: idl.HTMLElement,1720 members: {1721 },1722 });1723});1724//1725// Interface HTMLParagraphElement1726//1727defineLazyProperty(global, "HTMLParagraphElement", function() {1728 return idl.HTMLParagraphElement.publicInterface;1729}, true);1730defineLazyProperty(idl, "HTMLParagraphElement", function() {1731 return new IDLInterface({1732 name: "HTMLParagraphElement",1733 superclass: idl.HTMLElement,1734 members: {1735 },1736 });1737});1738//1739// Interface HTMLHRElement1740//1741defineLazyProperty(global, "HTMLHRElement", function() {1742 return idl.HTMLHRElement.publicInterface;1743}, true);1744defineLazyProperty(idl, "HTMLHRElement", function() {1745 return new IDLInterface({1746 name: "HTMLHRElement",1747 superclass: idl.HTMLElement,1748 members: {1749 },1750 });1751});1752//1753// Interface HTMLPreElement1754//1755defineLazyProperty(global, "HTMLPreElement", function() {1756 return idl.HTMLPreElement.publicInterface;1757}, true);1758defineLazyProperty(idl, "HTMLPreElement", function() {1759 return new IDLInterface({1760 name: "HTMLPreElement",1761 superclass: idl.HTMLElement,1762 members: {1763 },1764 });1765});1766//1767// Interface HTMLQuoteElement1768//1769defineLazyProperty(global, "HTMLQuoteElement", function() {1770 return idl.HTMLQuoteElement.publicInterface;1771}, true);1772defineLazyProperty(idl, "HTMLQuoteElement", function() {1773 return new IDLInterface({1774 name: "HTMLQuoteElement",1775 superclass: idl.HTMLElement,1776 members: {1777 get cite() {1778 return unwrap(this).cite;1779 },1780 set cite(newval) {1781 unwrap(this).cite = String(newval);1782 },1783 },1784 });1785});1786//1787// Interface HTMLOListElement1788//1789defineLazyProperty(global, "HTMLOListElement", function() {1790 return idl.HTMLOListElement.publicInterface;1791}, true);1792defineLazyProperty(idl, "HTMLOListElement", function() {1793 return new IDLInterface({1794 name: "HTMLOListElement",1795 superclass: idl.HTMLElement,1796 members: {1797 get reversed() {1798 return unwrap(this).reversed;1799 },1800 set reversed(newval) {1801 unwrap(this).reversed = Boolean(newval);1802 },1803 get start() {1804 return unwrap(this).start;1805 },1806 set start(newval) {1807 unwrap(this).start = toLong(newval);1808 },1809 get type() {1810 return unwrap(this).type;1811 },1812 set type(newval) {1813 unwrap(this).type = String(newval);1814 },1815 },1816 });1817});1818//1819// Interface HTMLUListElement1820//1821defineLazyProperty(global, "HTMLUListElement", function() {1822 return idl.HTMLUListElement.publicInterface;1823}, true);1824defineLazyProperty(idl, "HTMLUListElement", function() {1825 return new IDLInterface({1826 name: "HTMLUListElement",1827 superclass: idl.HTMLElement,1828 members: {1829 },1830 });1831});1832//1833// Interface HTMLLIElement1834//1835defineLazyProperty(global, "HTMLLIElement", function() {1836 return idl.HTMLLIElement.publicInterface;1837}, true);1838defineLazyProperty(idl, "HTMLLIElement", function() {1839 return new IDLInterface({1840 name: "HTMLLIElement",1841 superclass: idl.HTMLElement,1842 members: {1843 get value() {1844 return unwrap(this).value;1845 },1846 set value(newval) {1847 unwrap(this).value = toLong(newval);1848 },1849 },1850 });1851});1852//1853// Interface HTMLDListElement1854//1855defineLazyProperty(global, "HTMLDListElement", function() {1856 return idl.HTMLDListElement.publicInterface;1857}, true);1858defineLazyProperty(idl, "HTMLDListElement", function() {1859 return new IDLInterface({1860 name: "HTMLDListElement",1861 superclass: idl.HTMLElement,1862 members: {1863 },1864 });1865});1866//1867// Interface HTMLDivElement1868//1869defineLazyProperty(global, "HTMLDivElement", function() {1870 return idl.HTMLDivElement.publicInterface;1871}, true);1872defineLazyProperty(idl, "HTMLDivElement", function() {1873 return new IDLInterface({1874 name: "HTMLDivElement",1875 superclass: idl.HTMLElement,1876 members: {1877 },1878 });1879});1880//1881// Interface HTMLAnchorElement1882//1883defineLazyProperty(global, "HTMLAnchorElement", function() {1884 return idl.HTMLAnchorElement.publicInterface;1885}, true);1886defineLazyProperty(idl, "HTMLAnchorElement", function() {1887 return new IDLInterface({1888 name: "HTMLAnchorElement",1889 superclass: idl.HTMLElement,1890 members: {1891 get href() {1892 return unwrap(this).href;1893 },1894 set href(newval) {1895 unwrap(this).href = String(newval);1896 },1897 get target() {1898 return unwrap(this).target;1899 },1900 set target(newval) {1901 unwrap(this).target = String(newval);1902 },1903 get download() {1904 return unwrap(this).download;1905 },1906 set download(newval) {1907 unwrap(this).download = String(newval);1908 },1909 get ping() {1910 return unwrap(this).ping;1911 },1912 set ping(newval) {1913 unwrap(this).ping = String(newval);1914 },1915 get rel() {1916 return unwrap(this).rel;1917 },1918 set rel(newval) {1919 unwrap(this).rel = String(newval);1920 },1921 get relList() {1922 return wrap(unwrap(this).relList);1923 },1924 get media() {1925 return unwrap(this).media;1926 },1927 set media(newval) {1928 unwrap(this).media = String(newval);1929 },1930 get hreflang() {1931 return unwrap(this).hreflang;1932 },1933 set hreflang(newval) {1934 unwrap(this).hreflang = String(newval);1935 },1936 get type() {1937 return unwrap(this).type;1938 },1939 set type(newval) {1940 unwrap(this).type = String(newval);1941 },1942 get text() {1943 return unwrap(this).text;1944 },1945 set text(newval) {1946 unwrap(this).text = String(newval);1947 },1948 get protocol() {1949 return unwrap(this).protocol;1950 },1951 set protocol(newval) {1952 unwrap(this).protocol = String(newval);1953 },1954 get host() {1955 return unwrap(this).host;1956 },1957 set host(newval) {1958 unwrap(this).host = String(newval);1959 },1960 get hostname() {1961 return unwrap(this).hostname;1962 },1963 set hostname(newval) {1964 unwrap(this).hostname = String(newval);1965 },1966 get port() {1967 return unwrap(this).port;1968 },1969 set port(newval) {1970 unwrap(this).port = String(newval);1971 },1972 get pathname() {1973 return unwrap(this).pathname;1974 },1975 set pathname(newval) {1976 unwrap(this).pathname = String(newval);1977 },1978 get search() {1979 return unwrap(this).search;1980 },1981 set search(newval) {1982 unwrap(this).search = String(newval);1983 },1984 get hash() {1985 return unwrap(this).hash;1986 },1987 set hash(newval) {1988 unwrap(this).hash = String(newval);1989 },1990 },1991 });1992});1993//1994// Interface HTMLTimeElement1995//1996defineLazyProperty(global, "HTMLTimeElement", function() {1997 return idl.HTMLTimeElement.publicInterface;1998}, true);1999defineLazyProperty(idl, "HTMLTimeElement", function() {2000 return new IDLInterface({2001 name: "HTMLTimeElement",2002 superclass: idl.HTMLElement,2003 members: {2004 get dateTime() {2005 return unwrap(this).dateTime;2006 },2007 set dateTime(newval) {2008 unwrap(this).dateTime = String(newval);2009 },2010 get pubDate() {2011 return unwrap(this).pubDate;2012 },2013 set pubDate(newval) {2014 unwrap(this).pubDate = Boolean(newval);2015 },2016 get valueAsDate() {2017 return wrap(unwrap(this).valueAsDate);2018 },2019 },2020 });2021});2022//2023// Interface HTMLSpanElement2024//2025defineLazyProperty(global, "HTMLSpanElement", function() {2026 return idl.HTMLSpanElement.publicInterface;2027}, true);2028defineLazyProperty(idl, "HTMLSpanElement", function() {2029 return new IDLInterface({2030 name: "HTMLSpanElement",2031 superclass: idl.HTMLElement,2032 members: {2033 },2034 });2035});2036//2037// Interface HTMLBRElement2038//2039defineLazyProperty(global, "HTMLBRElement", function() {2040 return idl.HTMLBRElement.publicInterface;2041}, true);2042defineLazyProperty(idl, "HTMLBRElement", function() {2043 return new IDLInterface({2044 name: "HTMLBRElement",2045 superclass: idl.HTMLElement,2046 members: {2047 },2048 });2049});2050//2051// Interface HTMLModElement2052//2053defineLazyProperty(global, "HTMLModElement", function() {2054 return idl.HTMLModElement.publicInterface;2055}, true);2056defineLazyProperty(idl, "HTMLModElement", function() {2057 return new IDLInterface({2058 name: "HTMLModElement",2059 superclass: idl.HTMLElement,2060 members: {2061 get cite() {2062 return unwrap(this).cite;2063 },2064 set cite(newval) {2065 unwrap(this).cite = String(newval);2066 },2067 get dateTime() {2068 return unwrap(this).dateTime;2069 },2070 set dateTime(newval) {2071 unwrap(this).dateTime = String(newval);2072 },2073 },2074 });2075});2076//2077// Interface HTMLImageElement2078//2079defineLazyProperty(global, "HTMLImageElement", function() {2080 return idl.HTMLImageElement.publicInterface;2081}, true);2082defineLazyProperty(idl, "HTMLImageElement", function() {2083 return new IDLInterface({2084 name: "HTMLImageElement",2085 superclass: idl.HTMLElement,2086 members: {2087 get alt() {2088 return unwrap(this).alt;2089 },2090 set alt(newval) {2091 unwrap(this).alt = String(newval);2092 },2093 get src() {2094 return unwrap(this).src;2095 },2096 set src(newval) {2097 unwrap(this).src = String(newval);2098 },2099 get crossOrigin() {2100 return unwrap(this).crossOrigin;2101 },2102 set crossOrigin(newval) {2103 unwrap(this).crossOrigin = String(newval);2104 },2105 get useMap() {2106 return unwrap(this).useMap;2107 },2108 set useMap(newval) {2109 unwrap(this).useMap = String(newval);2110 },2111 get isMap() {2112 return unwrap(this).isMap;2113 },2114 set isMap(newval) {2115 unwrap(this).isMap = Boolean(newval);2116 },2117 get width() {2118 return unwrap(this).width;2119 },2120 set width(newval) {2121 unwrap(this).width = toULong(newval);2122 },2123 get height() {2124 return unwrap(this).height;2125 },2126 set height(newval) {2127 unwrap(this).height = toULong(newval);2128 },2129 get naturalWidth() {2130 return unwrap(this).naturalWidth;2131 },2132 get naturalHeight() {2133 return unwrap(this).naturalHeight;2134 },2135 get complete() {2136 return unwrap(this).complete;2137 },2138 },2139 });2140});2141//2142// Interface HTMLIFrameElement2143//2144defineLazyProperty(global, "HTMLIFrameElement", function() {2145 return idl.HTMLIFrameElement.publicInterface;2146}, true);2147defineLazyProperty(idl, "HTMLIFrameElement", function() {2148 return new IDLInterface({2149 name: "HTMLIFrameElement",2150 superclass: idl.HTMLElement,2151 members: {2152 get src() {2153 return unwrap(this).src;2154 },2155 set src(newval) {2156 unwrap(this).src = String(newval);2157 },2158 get srcdoc() {2159 return unwrap(this).srcdoc;2160 },2161 set srcdoc(newval) {2162 unwrap(this).srcdoc = String(newval);2163 },2164 get name() {2165 return unwrap(this).name;2166 },2167 set name(newval) {2168 unwrap(this).name = String(newval);2169 },2170 get sandbox() {2171 return wrap(unwrap(this).sandbox);2172 },2173 get seamless() {2174 return unwrap(this).seamless;2175 },2176 set seamless(newval) {2177 unwrap(this).seamless = Boolean(newval);2178 },2179 get width() {2180 return unwrap(this).width;2181 },2182 set width(newval) {2183 unwrap(this).width = String(newval);2184 },2185 get height() {2186 return unwrap(this).height;2187 },2188 set height(newval) {2189 unwrap(this).height = String(newval);2190 },2191 get contentDocument() {2192 return wrap(unwrap(this).contentDocument);2193 },2194 get contentWindow() {2195 return wrap(unwrap(this).contentWindow);2196 },2197 },2198 });2199});2200//2201// Interface HTMLEmbedElement2202//2203defineLazyProperty(global, "HTMLEmbedElement", function() {2204 return idl.HTMLEmbedElement.publicInterface;2205}, true);2206defineLazyProperty(idl, "HTMLEmbedElement", function() {2207 return new IDLInterface({2208 name: "HTMLEmbedElement",2209 superclass: idl.HTMLElement,2210 members: {2211 get src() {2212 return unwrap(this).src;2213 },2214 set src(newval) {2215 unwrap(this).src = String(newval);2216 },2217 get type() {2218 return unwrap(this).type;2219 },2220 set type(newval) {2221 unwrap(this).type = String(newval);2222 },2223 get width() {2224 return unwrap(this).width;2225 },2226 set width(newval) {2227 unwrap(this).width = String(newval);2228 },2229 get height() {2230 return unwrap(this).height;2231 },2232 set height(newval) {2233 unwrap(this).height = String(newval);2234 },2235 },2236 });2237});2238//2239// Interface HTMLObjectElement2240//2241defineLazyProperty(global, "HTMLObjectElement", function() {2242 return idl.HTMLObjectElement.publicInterface;2243}, true);2244defineLazyProperty(idl, "HTMLObjectElement", function() {2245 return new IDLInterface({2246 name: "HTMLObjectElement",2247 superclass: idl.HTMLElement,2248 members: {2249 get data() {2250 return unwrap(this).data;2251 },2252 set data(newval) {2253 unwrap(this).data = String(newval);2254 },2255 get type() {2256 return unwrap(this).type;2257 },2258 set type(newval) {2259 unwrap(this).type = String(newval);2260 },2261 get typeMustMatch() {2262 return unwrap(this).typeMustMatch;2263 },2264 set typeMustMatch(newval) {2265 unwrap(this).typeMustMatch = Boolean(newval);2266 },2267 get name() {2268 return unwrap(this).name;2269 },2270 set name(newval) {2271 unwrap(this).name = String(newval);2272 },2273 get useMap() {2274 return unwrap(this).useMap;2275 },2276 set useMap(newval) {2277 unwrap(this).useMap = String(newval);2278 },2279 get form() {2280 return wrap(unwrap(this).form);2281 },2282 get width() {2283 return unwrap(this).width;2284 },2285 set width(newval) {2286 unwrap(this).width = String(newval);2287 },2288 get height() {2289 return unwrap(this).height;2290 },2291 set height(newval) {2292 unwrap(this).height = String(newval);2293 },2294 get contentDocument() {2295 return wrap(unwrap(this).contentDocument);2296 },2297 get contentWindow() {2298 return wrap(unwrap(this).contentWindow);2299 },2300 get willValidate() {2301 return unwrap(this).willValidate;2302 },2303 get validity() {2304 return wrap(unwrap(this).validity);2305 },2306 get validationMessage() {2307 return unwrap(this).validationMessage;2308 },2309 checkValidity: function checkValidity() {2310 return unwrap(this).checkValidity();2311 },2312 setCustomValidity: function setCustomValidity(error) {2313 unwrap(this).setCustomValidity(String(error));2314 },2315 },2316 });2317});2318//2319// Interface HTMLParamElement2320//2321defineLazyProperty(global, "HTMLParamElement", function() {2322 return idl.HTMLParamElement.publicInterface;2323}, true);2324defineLazyProperty(idl, "HTMLParamElement", function() {2325 return new IDLInterface({2326 name: "HTMLParamElement",2327 superclass: idl.HTMLElement,2328 members: {2329 get name() {2330 return unwrap(this).name;2331 },2332 set name(newval) {2333 unwrap(this).name = String(newval);2334 },2335 get value() {2336 return unwrap(this).value;2337 },2338 set value(newval) {2339 unwrap(this).value = String(newval);2340 },2341 },2342 });2343});2344//2345// Interface HTMLMediaElement2346//2347// Constants defined by HTMLMediaElement2348const NETWORK_EMPTY = 0;2349const NETWORK_IDLE = 1;2350const NETWORK_LOADING = 2;2351const NETWORK_NO_SOURCE = 3;2352const HAVE_NOTHING = 0;2353const HAVE_METADATA = 1;2354const HAVE_CURRENT_DATA = 2;2355const HAVE_FUTURE_DATA = 3;2356const HAVE_ENOUGH_DATA = 4;2357defineLazyProperty(global, "HTMLMediaElement", function() {2358 return idl.HTMLMediaElement.publicInterface;2359}, true);2360defineLazyProperty(idl, "HTMLMediaElement", function() {2361 return new IDLInterface({2362 name: "HTMLMediaElement",2363 superclass: idl.HTMLElement,2364 constants: {2365 NETWORK_EMPTY: NETWORK_EMPTY,2366 NETWORK_IDLE: NETWORK_IDLE,2367 NETWORK_LOADING: NETWORK_LOADING,2368 NETWORK_NO_SOURCE: NETWORK_NO_SOURCE,2369 HAVE_NOTHING: HAVE_NOTHING,2370 HAVE_METADATA: HAVE_METADATA,2371 HAVE_CURRENT_DATA: HAVE_CURRENT_DATA,2372 HAVE_FUTURE_DATA: HAVE_FUTURE_DATA,2373 HAVE_ENOUGH_DATA: HAVE_ENOUGH_DATA,2374 },2375 members: {2376 get error() {2377 return wrap(unwrap(this).error);2378 },2379 get src() {2380 return unwrap(this).src;2381 },2382 set src(newval) {2383 unwrap(this).src = String(newval);2384 },2385 get currentSrc() {2386 return unwrap(this).currentSrc;2387 },2388 get crossOrigin() {2389 return unwrap(this).crossOrigin;2390 },2391 set crossOrigin(newval) {2392 unwrap(this).crossOrigin = String(newval);2393 },2394 get networkState() {2395 return unwrap(this).networkState;2396 },2397 get preload() {2398 return unwrap(this).preload;2399 },2400 set preload(newval) {2401 unwrap(this).preload = String(newval);2402 },2403 get buffered() {2404 return wrap(unwrap(this).buffered);2405 },2406 load: function load() {2407 unwrap(this).load();2408 },2409 canPlayType: function canPlayType(type) {2410 return unwrap(this).canPlayType(String(type));2411 },2412 get readyState() {2413 return unwrap(this).readyState;2414 },2415 get seeking() {2416 return unwrap(this).seeking;2417 },2418 get currentTime() {2419 return unwrap(this).currentTime;2420 },2421 set currentTime(newval) {2422 unwrap(this).currentTime = toDouble(newval);2423 },2424 get initialTime() {2425 return unwrap(this).initialTime;2426 },2427 get duration() {2428 return unwrap(this).duration;2429 },2430 get startOffsetTime() {2431 return wrap(unwrap(this).startOffsetTime);2432 },2433 get paused() {2434 return unwrap(this).paused;2435 },2436 get defaultPlaybackRate() {2437 return unwrap(this).defaultPlaybackRate;2438 },2439 set defaultPlaybackRate(newval) {2440 unwrap(this).defaultPlaybackRate = toDouble(newval);2441 },2442 get playbackRate() {2443 return unwrap(this).playbackRate;2444 },2445 set playbackRate(newval) {2446 unwrap(this).playbackRate = toDouble(newval);2447 },2448 get played() {2449 return wrap(unwrap(this).played);2450 },2451 get seekable() {2452 return wrap(unwrap(this).seekable);2453 },2454 get ended() {2455 return unwrap(this).ended;2456 },2457 get autoplay() {2458 return unwrap(this).autoplay;2459 },2460 set autoplay(newval) {2461 unwrap(this).autoplay = Boolean(newval);2462 },2463 get loop() {2464 return unwrap(this).loop;2465 },2466 set loop(newval) {2467 unwrap(this).loop = Boolean(newval);2468 },2469 play: function play() {2470 unwrap(this).play();2471 },2472 pause: function pause() {2473 unwrap(this).pause();2474 },2475 get mediaGroup() {2476 return unwrap(this).mediaGroup;2477 },2478 set mediaGroup(newval) {2479 unwrap(this).mediaGroup = String(newval);2480 },2481 get controller() {2482 return wrap(unwrap(this).controller);2483 },2484 set controller(newval) {2485 unwrap(this).controller = unwrapOrNull(newval);2486 },2487 get controls() {2488 return unwrap(this).controls;2489 },2490 set controls(newval) {2491 unwrap(this).controls = Boolean(newval);2492 },2493 get volume() {2494 return unwrap(this).volume;2495 },2496 set volume(newval) {2497 unwrap(this).volume = toDouble(newval);2498 },2499 get muted() {2500 return unwrap(this).muted;2501 },2502 set muted(newval) {2503 unwrap(this).muted = Boolean(newval);2504 },2505 get defaultMuted() {2506 return unwrap(this).defaultMuted;2507 },2508 set defaultMuted(newval) {2509 unwrap(this).defaultMuted = Boolean(newval);2510 },2511 get audioTracks() {2512 return wrap(unwrap(this).audioTracks);2513 },2514 get videoTracks() {2515 return wrap(unwrap(this).videoTracks);2516 },2517 get textTracks() {2518 return wrap(unwrap(this).textTracks);2519 },2520 addTextTrack: function addTextTrack(2521 kind,2522 label,2523 language)2524 {2525 return wrap(unwrap(this).addTextTrack(2526 String(kind),2527 OptionalString(label),2528 OptionalString(language)));2529 },2530 },2531 });2532});2533//2534// Interface HTMLVideoElement2535//2536defineLazyProperty(global, "HTMLVideoElement", function() {2537 return idl.HTMLVideoElement.publicInterface;2538}, true);2539defineLazyProperty(idl, "HTMLVideoElement", function() {2540 return new IDLInterface({2541 name: "HTMLVideoElement",2542 superclass: idl.HTMLMediaElement,2543 members: {2544 get width() {2545 return unwrap(this).width;2546 },2547 set width(newval) {2548 unwrap(this).width = toULong(newval);2549 },2550 get height() {2551 return unwrap(this).height;2552 },2553 set height(newval) {2554 unwrap(this).height = toULong(newval);2555 },2556 get videoWidth() {2557 return unwrap(this).videoWidth;2558 },2559 get videoHeight() {2560 return unwrap(this).videoHeight;2561 },2562 get poster() {2563 return unwrap(this).poster;2564 },2565 set poster(newval) {2566 unwrap(this).poster = String(newval);2567 },2568 },2569 });2570});2571//2572// Interface HTMLAudioElement2573//2574defineLazyProperty(global, "HTMLAudioElement", function() {2575 return idl.HTMLAudioElement.publicInterface;2576}, true);2577defineLazyProperty(idl, "HTMLAudioElement", function() {2578 return new IDLInterface({2579 name: "HTMLAudioElement",2580 superclass: idl.HTMLMediaElement,2581 members: {2582 },2583 });2584});2585//2586// Interface HTMLSourceElement2587//2588defineLazyProperty(global, "HTMLSourceElement", function() {2589 return idl.HTMLSourceElement.publicInterface;2590}, true);2591defineLazyProperty(idl, "HTMLSourceElement", function() {2592 return new IDLInterface({2593 name: "HTMLSourceElement",2594 superclass: idl.HTMLElement,2595 members: {2596 get src() {2597 return unwrap(this).src;2598 },2599 set src(newval) {2600 unwrap(this).src = String(newval);2601 },2602 get type() {2603 return unwrap(this).type;2604 },2605 set type(newval) {2606 unwrap(this).type = String(newval);2607 },2608 get media() {2609 return unwrap(this).media;2610 },2611 set media(newval) {2612 unwrap(this).media = String(newval);2613 },2614 },2615 });2616});2617//2618// Interface HTMLTrackElement2619//2620defineLazyProperty(global, "HTMLTrackElement", function() {2621 return idl.HTMLTrackElement.publicInterface;2622}, true);2623defineLazyProperty(idl, "HTMLTrackElement", function() {2624 return new IDLInterface({2625 name: "HTMLTrackElement",2626 superclass: idl.HTMLElement,2627 members: {2628 get kind() {2629 return unwrap(this).kind;2630 },2631 set kind(newval) {2632 unwrap(this).kind = String(newval);2633 },2634 get src() {2635 return unwrap(this).src;2636 },2637 set src(newval) {2638 unwrap(this).src = String(newval);2639 },2640 get srclang() {2641 return unwrap(this).srclang;2642 },2643 set srclang(newval) {2644 unwrap(this).srclang = String(newval);2645 },2646 get label() {2647 return unwrap(this).label;2648 },2649 set label(newval) {2650 unwrap(this).label = String(newval);2651 },2652 get default() {2653 return unwrap(this).default;2654 },2655 set default(newval) {2656 unwrap(this).default = Boolean(newval);2657 },2658 get track() {2659 return wrap(unwrap(this).track);2660 },2661 },2662 });2663});2664//2665// Interface HTMLMapElement2666//2667defineLazyProperty(global, "HTMLMapElement", function() {2668 return idl.HTMLMapElement.publicInterface;2669}, true);2670defineLazyProperty(idl, "HTMLMapElement", function() {2671 return new IDLInterface({2672 name: "HTMLMapElement",2673 superclass: idl.HTMLElement,2674 members: {2675 get name() {2676 return unwrap(this).name;2677 },2678 set name(newval) {2679 unwrap(this).name = String(newval);2680 },2681 get areas() {2682 return wrap(unwrap(this).areas);2683 },2684 get images() {2685 return wrap(unwrap(this).images);2686 },2687 },2688 });2689});2690//2691// Interface HTMLAreaElement2692//2693defineLazyProperty(global, "HTMLAreaElement", function() {2694 return idl.HTMLAreaElement.publicInterface;2695}, true);2696defineLazyProperty(idl, "HTMLAreaElement", function() {2697 return new IDLInterface({2698 name: "HTMLAreaElement",2699 superclass: idl.HTMLElement,2700 members: {2701 get alt() {2702 return unwrap(this).alt;2703 },2704 set alt(newval) {2705 unwrap(this).alt = String(newval);2706 },2707 get coords() {2708 return unwrap(this).coords;2709 },2710 set coords(newval) {2711 unwrap(this).coords = String(newval);2712 },2713 get shape() {2714 return unwrap(this).shape;2715 },2716 set shape(newval) {2717 unwrap(this).shape = String(newval);2718 },2719 get href() {2720 return unwrap(this).href;2721 },2722 set href(newval) {2723 unwrap(this).href = String(newval);2724 },2725 get target() {2726 return unwrap(this).target;2727 },2728 set target(newval) {2729 unwrap(this).target = String(newval);2730 },2731 get download() {2732 return unwrap(this).download;2733 },2734 set download(newval) {2735 unwrap(this).download = String(newval);2736 },2737 get ping() {2738 return unwrap(this).ping;2739 },2740 set ping(newval) {2741 unwrap(this).ping = String(newval);2742 },2743 get rel() {2744 return unwrap(this).rel;2745 },2746 set rel(newval) {2747 unwrap(this).rel = String(newval);2748 },2749 get relList() {2750 return wrap(unwrap(this).relList);2751 },2752 get media() {2753 return unwrap(this).media;2754 },2755 set media(newval) {2756 unwrap(this).media = String(newval);2757 },2758 get hreflang() {2759 return unwrap(this).hreflang;2760 },2761 set hreflang(newval) {2762 unwrap(this).hreflang = String(newval);2763 },2764 get type() {2765 return unwrap(this).type;2766 },2767 set type(newval) {2768 unwrap(this).type = String(newval);2769 },2770 get protocol() {2771 return unwrap(this).protocol;2772 },2773 set protocol(newval) {2774 unwrap(this).protocol = String(newval);2775 },2776 get host() {2777 return unwrap(this).host;2778 },2779 set host(newval) {2780 unwrap(this).host = String(newval);2781 },2782 get hostname() {2783 return unwrap(this).hostname;2784 },2785 set hostname(newval) {2786 unwrap(this).hostname = String(newval);2787 },2788 get port() {2789 return unwrap(this).port;2790 },2791 set port(newval) {2792 unwrap(this).port = String(newval);2793 },2794 get pathname() {2795 return unwrap(this).pathname;2796 },2797 set pathname(newval) {2798 unwrap(this).pathname = String(newval);2799 },2800 get search() {2801 return unwrap(this).search;2802 },2803 set search(newval) {2804 unwrap(this).search = String(newval);2805 },2806 get hash() {2807 return unwrap(this).hash;2808 },2809 set hash(newval) {2810 unwrap(this).hash = String(newval);2811 },2812 },2813 });2814});2815//2816// Interface HTMLTableElement2817//2818defineLazyProperty(global, "HTMLTableElement", function() {2819 return idl.HTMLTableElement.publicInterface;2820}, true);2821defineLazyProperty(idl, "HTMLTableElement", function() {2822 return new IDLInterface({2823 name: "HTMLTableElement",2824 superclass: idl.HTMLElement,2825 members: {2826 get caption() {2827 return wrap(unwrap(this).caption);2828 },2829 set caption(newval) {2830 unwrap(this).caption = unwrapOrNull(newval);2831 },2832 createCaption: function createCaption() {2833 return wrap(unwrap(this).createCaption());2834 },2835 deleteCaption: function deleteCaption() {2836 unwrap(this).deleteCaption();2837 },2838 get tHead() {2839 return wrap(unwrap(this).tHead);2840 },2841 set tHead(newval) {2842 unwrap(this).tHead = unwrapOrNull(newval);2843 },2844 createTHead: function createTHead() {2845 return wrap(unwrap(this).createTHead());2846 },2847 deleteTHead: function deleteTHead() {2848 unwrap(this).deleteTHead();2849 },2850 get tFoot() {2851 return wrap(unwrap(this).tFoot);2852 },2853 set tFoot(newval) {2854 unwrap(this).tFoot = unwrapOrNull(newval);2855 },2856 createTFoot: function createTFoot() {2857 return wrap(unwrap(this).createTFoot());2858 },2859 deleteTFoot: function deleteTFoot() {2860 unwrap(this).deleteTFoot();2861 },2862 get tBodies() {2863 return wrap(unwrap(this).tBodies);2864 },2865 createTBody: function createTBody() {2866 return wrap(unwrap(this).createTBody());2867 },2868 get rows() {2869 return wrap(unwrap(this).rows);2870 },2871 insertRow: function insertRow(index) {2872 return wrap(unwrap(this).insertRow(OptionaltoLong(index)));2873 },2874 deleteRow: function deleteRow(index) {2875 unwrap(this).deleteRow(toLong(index));2876 },2877 get border() {2878 return unwrap(this).border;2879 },2880 set border(newval) {2881 unwrap(this).border = String(newval);2882 },2883 },2884 });2885});2886//2887// Interface HTMLTableCaptionElement2888//2889defineLazyProperty(global, "HTMLTableCaptionElement", function() {2890 return idl.HTMLTableCaptionElement.publicInterface;2891}, true);2892defineLazyProperty(idl, "HTMLTableCaptionElement", function() {2893 return new IDLInterface({2894 name: "HTMLTableCaptionElement",2895 superclass: idl.HTMLElement,2896 members: {2897 },2898 });2899});2900//2901// Interface HTMLTableColElement2902//2903defineLazyProperty(global, "HTMLTableColElement", function() {2904 return idl.HTMLTableColElement.publicInterface;2905}, true);2906defineLazyProperty(idl, "HTMLTableColElement", function() {2907 return new IDLInterface({2908 name: "HTMLTableColElement",2909 superclass: idl.HTMLElement,2910 members: {2911 get span() {2912 return unwrap(this).span;2913 },2914 set span(newval) {2915 unwrap(this).span = toULong(newval);2916 },2917 },2918 });2919});2920//2921// Interface HTMLTableSectionElement2922//2923defineLazyProperty(global, "HTMLTableSectionElement", function() {2924 return idl.HTMLTableSectionElement.publicInterface;2925}, true);2926defineLazyProperty(idl, "HTMLTableSectionElement", function() {2927 return new IDLInterface({2928 name: "HTMLTableSectionElement",2929 superclass: idl.HTMLElement,2930 members: {2931 get rows() {2932 return wrap(unwrap(this).rows);2933 },2934 insertRow: function insertRow(index) {2935 return wrap(unwrap(this).insertRow(OptionaltoLong(index)));2936 },2937 deleteRow: function deleteRow(index) {2938 unwrap(this).deleteRow(toLong(index));2939 },2940 },2941 });2942});2943//2944// Interface HTMLTableRowElement2945//2946defineLazyProperty(global, "HTMLTableRowElement", function() {2947 return idl.HTMLTableRowElement.publicInterface;2948}, true);2949defineLazyProperty(idl, "HTMLTableRowElement", function() {2950 return new IDLInterface({2951 name: "HTMLTableRowElement",2952 superclass: idl.HTMLElement,2953 members: {2954 get rowIndex() {2955 return unwrap(this).rowIndex;2956 },2957 get sectionRowIndex() {2958 return unwrap(this).sectionRowIndex;2959 },2960 get cells() {2961 return wrap(unwrap(this).cells);2962 },2963 insertCell: function insertCell(index) {2964 return wrap(unwrap(this).insertCell(OptionaltoLong(index)));2965 },2966 deleteCell: function deleteCell(index) {2967 unwrap(this).deleteCell(toLong(index));2968 },2969 },2970 });2971});2972//2973// Interface HTMLTableDataCellElement2974//2975defineLazyProperty(global, "HTMLTableDataCellElement", function() {2976 return idl.HTMLTableDataCellElement.publicInterface;2977}, true);2978defineLazyProperty(idl, "HTMLTableDataCellElement", function() {2979 return new IDLInterface({2980 name: "HTMLTableDataCellElement",2981 superclass: idl.HTMLTableCellElement,2982 members: {2983 },2984 });2985});2986//2987// Interface HTMLTableHeaderCellElement2988//2989defineLazyProperty(global, "HTMLTableHeaderCellElement", function() {2990 return idl.HTMLTableHeaderCellElement.publicInterface;2991}, true);2992defineLazyProperty(idl, "HTMLTableHeaderCellElement", function() {2993 return new IDLInterface({2994 name: "HTMLTableHeaderCellElement",2995 superclass: idl.HTMLTableCellElement,2996 members: {2997 get scope() {2998 return unwrap(this).scope;2999 },3000 set scope(newval) {3001 unwrap(this).scope = String(newval);3002 },3003 },3004 });3005});3006//3007// Interface HTMLTableCellElement3008//3009defineLazyProperty(global, "HTMLTableCellElement", function() {3010 return idl.HTMLTableCellElement.publicInterface;3011}, true);3012defineLazyProperty(idl, "HTMLTableCellElement", function() {3013 return new IDLInterface({3014 name: "HTMLTableCellElement",3015 superclass: idl.HTMLElement,3016 members: {3017 get colSpan() {3018 return unwrap(this).colSpan;3019 },3020 set colSpan(newval) {3021 unwrap(this).colSpan = toULong(newval);3022 },3023 get rowSpan() {3024 return unwrap(this).rowSpan;3025 },3026 set rowSpan(newval) {3027 unwrap(this).rowSpan = toULong(newval);3028 },3029 get headers() {3030 return wrap(unwrap(this).headers);3031 },3032 get cellIndex() {3033 return unwrap(this).cellIndex;3034 },3035 },3036 });3037});3038//3039// Interface HTMLFormElement3040//3041defineLazyProperty(global, "HTMLFormElement", function() {3042 return idl.HTMLFormElement.publicInterface;3043}, true);3044defineLazyProperty(idl, "HTMLFormElement", function() {3045 return new IDLInterface({3046 name: "HTMLFormElement",3047 superclass: idl.HTMLElement,3048 members: {3049 get acceptCharset() {3050 return unwrap(this).acceptCharset;3051 },3052 set acceptCharset(newval) {3053 unwrap(this).acceptCharset = String(newval);3054 },3055 get action() {3056 return unwrap(this).action;3057 },3058 set action(newval) {3059 unwrap(this).action = String(newval);3060 },3061 get autocomplete() {3062 return unwrap(this).autocomplete;3063 },3064 set autocomplete(newval) {3065 unwrap(this).autocomplete = String(newval);3066 },3067 get enctype() {3068 return unwrap(this).enctype;3069 },3070 set enctype(newval) {3071 unwrap(this).enctype = String(newval);3072 },3073 get encoding() {3074 return unwrap(this).encoding;3075 },3076 set encoding(newval) {3077 unwrap(this).encoding = String(newval);3078 },3079 get method() {3080 return unwrap(this).method;3081 },3082 set method(newval) {3083 unwrap(this).method = String(newval);3084 },3085 get name() {3086 return unwrap(this).name;3087 },3088 set name(newval) {3089 unwrap(this).name = String(newval);3090 },3091 get noValidate() {3092 return unwrap(this).noValidate;3093 },3094 set noValidate(newval) {3095 unwrap(this).noValidate = Boolean(newval);3096 },3097 get target() {3098 return unwrap(this).target;3099 },3100 set target(newval) {3101 unwrap(this).target = String(newval);3102 },3103 get elements() {3104 return wrap(unwrap(this).elements);3105 },3106 get length() {3107 return unwrap(this).length;3108 },3109 submit: function submit() {3110 unwrap(this).submit();3111 },3112 reset: function reset() {3113 unwrap(this).reset();3114 },3115 checkValidity: function checkValidity() {3116 return unwrap(this).checkValidity();3117 },3118 },3119 });3120});3121//3122// Interface HTMLFieldSetElement3123//3124defineLazyProperty(global, "HTMLFieldSetElement", function() {3125 return idl.HTMLFieldSetElement.publicInterface;3126}, true);3127defineLazyProperty(idl, "HTMLFieldSetElement", function() {3128 return new IDLInterface({3129 name: "HTMLFieldSetElement",3130 superclass: idl.HTMLElement,3131 members: {3132 get disabled() {3133 return unwrap(this).disabled;3134 },3135 set disabled(newval) {3136 unwrap(this).disabled = Boolean(newval);3137 },3138 get form() {3139 return wrap(unwrap(this).form);3140 },3141 get name() {3142 return unwrap(this).name;3143 },3144 set name(newval) {3145 unwrap(this).name = String(newval);3146 },3147 get type() {3148 return unwrap(this).type;3149 },3150 get elements() {3151 return wrap(unwrap(this).elements);3152 },3153 get willValidate() {3154 return unwrap(this).willValidate;3155 },3156 get validity() {3157 return wrap(unwrap(this).validity);3158 },3159 get validationMessage() {3160 return unwrap(this).validationMessage;3161 },3162 checkValidity: function checkValidity() {3163 return unwrap(this).checkValidity();3164 },3165 setCustomValidity: function setCustomValidity(error) {3166 unwrap(this).setCustomValidity(String(error));3167 },3168 },3169 });3170});3171//3172// Interface HTMLLegendElement3173//3174defineLazyProperty(global, "HTMLLegendElement", function() {3175 return idl.HTMLLegendElement.publicInterface;3176}, true);3177defineLazyProperty(idl, "HTMLLegendElement", function() {3178 return new IDLInterface({3179 name: "HTMLLegendElement",3180 superclass: idl.HTMLElement,3181 members: {3182 get form() {3183 return wrap(unwrap(this).form);3184 },3185 },3186 });3187});3188//3189// Interface HTMLLabelElement3190//3191defineLazyProperty(global, "HTMLLabelElement", function() {3192 return idl.HTMLLabelElement.publicInterface;3193}, true);3194defineLazyProperty(idl, "HTMLLabelElement", function() {3195 return new IDLInterface({3196 name: "HTMLLabelElement",3197 superclass: idl.HTMLElement,3198 members: {3199 get form() {3200 return wrap(unwrap(this).form);3201 },3202 get htmlFor() {3203 return unwrap(this).htmlFor;3204 },3205 set htmlFor(newval) {3206 unwrap(this).htmlFor = String(newval);3207 },3208 get control() {3209 return wrap(unwrap(this).control);3210 },3211 },3212 });3213});3214//3215// Interface HTMLInputElement3216//3217defineLazyProperty(global, "HTMLInputElement", function() {3218 return idl.HTMLInputElement.publicInterface;3219}, true);3220defineLazyProperty(idl, "HTMLInputElement", function() {3221 return new IDLInterface({3222 name: "HTMLInputElement",3223 superclass: idl.HTMLElement,3224 members: {3225 get accept() {3226 return unwrap(this).accept;3227 },3228 set accept(newval) {3229 unwrap(this).accept = String(newval);3230 },3231 get alt() {3232 return unwrap(this).alt;3233 },3234 set alt(newval) {3235 unwrap(this).alt = String(newval);3236 },3237 get autocomplete() {3238 return unwrap(this).autocomplete;3239 },3240 set autocomplete(newval) {3241 unwrap(this).autocomplete = String(newval);3242 },3243 get autofocus() {3244 return unwrap(this).autofocus;3245 },3246 set autofocus(newval) {3247 unwrap(this).autofocus = Boolean(newval);3248 },3249 get defaultChecked() {3250 return unwrap(this).defaultChecked;3251 },3252 set defaultChecked(newval) {3253 unwrap(this).defaultChecked = Boolean(newval);3254 },3255 get checked() {3256 return unwrap(this).checked;3257 },3258 set checked(newval) {3259 unwrap(this).checked = Boolean(newval);3260 },3261 get dirName() {3262 return unwrap(this).dirName;3263 },3264 set dirName(newval) {3265 unwrap(this).dirName = String(newval);3266 },3267 get disabled() {3268 return unwrap(this).disabled;3269 },3270 set disabled(newval) {3271 unwrap(this).disabled = Boolean(newval);3272 },3273 get form() {3274 return wrap(unwrap(this).form);3275 },3276 get files() {3277 return wrap(unwrap(this).files);3278 },3279 get formAction() {3280 return unwrap(this).formAction;3281 },3282 set formAction(newval) {3283 unwrap(this).formAction = String(newval);3284 },3285 get formEnctype() {3286 return unwrap(this).formEnctype;3287 },3288 set formEnctype(newval) {3289 unwrap(this).formEnctype = String(newval);3290 },3291 get formMethod() {3292 return unwrap(this).formMethod;3293 },3294 set formMethod(newval) {3295 unwrap(this).formMethod = String(newval);3296 },3297 get formNoValidate() {3298 return unwrap(this).formNoValidate;3299 },3300 set formNoValidate(newval) {3301 unwrap(this).formNoValidate = Boolean(newval);3302 },3303 get formTarget() {3304 return unwrap(this).formTarget;3305 },3306 set formTarget(newval) {3307 unwrap(this).formTarget = String(newval);3308 },3309 get height() {3310 return unwrap(this).height;3311 },3312 set height(newval) {3313 unwrap(this).height = String(newval);3314 },3315 get indeterminate() {3316 return unwrap(this).indeterminate;3317 },3318 set indeterminate(newval) {3319 unwrap(this).indeterminate = Boolean(newval);3320 },3321 get list() {3322 return wrap(unwrap(this).list);3323 },3324 get max() {3325 return unwrap(this).max;3326 },3327 set max(newval) {3328 unwrap(this).max = String(newval);3329 },3330 get maxLength() {3331 return unwrap(this).maxLength;3332 },3333 set maxLength(newval) {3334 unwrap(this).maxLength = toLong(newval);3335 },3336 get min() {3337 return unwrap(this).min;3338 },3339 set min(newval) {3340 unwrap(this).min = String(newval);3341 },3342 get multiple() {3343 return unwrap(this).multiple;3344 },3345 set multiple(newval) {3346 unwrap(this).multiple = Boolean(newval);3347 },3348 get name() {3349 return unwrap(this).name;3350 },3351 set name(newval) {3352 unwrap(this).name = String(newval);3353 },3354 get pattern() {3355 return unwrap(this).pattern;3356 },3357 set pattern(newval) {3358 unwrap(this).pattern = String(newval);3359 },3360 get placeholder() {3361 return unwrap(this).placeholder;3362 },3363 set placeholder(newval) {3364 unwrap(this).placeholder = String(newval);3365 },3366 get readOnly() {3367 return unwrap(this).readOnly;3368 },3369 set readOnly(newval) {3370 unwrap(this).readOnly = Boolean(newval);3371 },3372 get required() {3373 return unwrap(this).required;3374 },3375 set required(newval) {3376 unwrap(this).required = Boolean(newval);3377 },3378 get size() {3379 return unwrap(this).size;3380 },3381 set size(newval) {3382 unwrap(this).size = toULong(newval);3383 },3384 get src() {3385 return unwrap(this).src;3386 },3387 set src(newval) {3388 unwrap(this).src = String(newval);3389 },3390 get step() {3391 return unwrap(this).step;3392 },3393 set step(newval) {3394 unwrap(this).step = String(newval);3395 },3396 get type() {3397 return unwrap(this).type;3398 },3399 set type(newval) {3400 unwrap(this).type = String(newval);3401 },3402 get defaultValue() {3403 return unwrap(this).defaultValue;3404 },3405 set defaultValue(newval) {3406 unwrap(this).defaultValue = String(newval);3407 },3408 get value() {3409 return unwrap(this).value;3410 },3411 set value(newval) {3412 unwrap(this).value = String(newval);3413 },3414 get valueAsDate() {3415 return wrap(unwrap(this).valueAsDate);3416 },3417 set valueAsDate(newval) {3418 unwrap(this).valueAsDate = unwrap(newval);3419 },3420 get valueAsNumber() {3421 return unwrap(this).valueAsNumber;3422 },3423 set valueAsNumber(newval) {3424 unwrap(this).valueAsNumber = toDouble(newval);3425 },3426 get selectedOption() {3427 return wrap(unwrap(this).selectedOption);3428 },3429 get width() {3430 return unwrap(this).width;3431 },3432 set width(newval) {3433 unwrap(this).width = String(newval);3434 },3435 stepUp: function stepUp(n) {3436 unwrap(this).stepUp(OptionaltoLong(n));3437 },3438 stepDown: function stepDown(n) {3439 unwrap(this).stepDown(OptionaltoLong(n));3440 },3441 get willValidate() {3442 return unwrap(this).willValidate;3443 },3444 get validity() {3445 return wrap(unwrap(this).validity);3446 },3447 get validationMessage() {3448 return unwrap(this).validationMessage;3449 },3450 checkValidity: function checkValidity() {3451 return unwrap(this).checkValidity();3452 },3453 setCustomValidity: function setCustomValidity(error) {3454 unwrap(this).setCustomValidity(String(error));3455 },3456 get labels() {3457 return wrap(unwrap(this).labels);3458 },3459 select: function select() {3460 unwrap(this).select();3461 },3462 get selectionStart() {3463 return unwrap(this).selectionStart;3464 },3465 set selectionStart(newval) {3466 unwrap(this).selectionStart = toULong(newval);3467 },3468 get selectionEnd() {3469 return unwrap(this).selectionEnd;3470 },3471 set selectionEnd(newval) {3472 unwrap(this).selectionEnd = toULong(newval);3473 },3474 get selectionDirection() {3475 return unwrap(this).selectionDirection;3476 },3477 set selectionDirection(newval) {3478 unwrap(this).selectionDirection = String(newval);3479 },3480 setSelectionRange: function setSelectionRange(3481 start,3482 end,3483 direction)3484 {3485 unwrap(this).setSelectionRange(3486 toULong(start),3487 toULong(end),3488 OptionalString(direction));3489 },3490 },3491 });3492});3493//3494// Interface HTMLButtonElement3495//3496defineLazyProperty(global, "HTMLButtonElement", function() {3497 return idl.HTMLButtonElement.publicInterface;3498}, true);3499defineLazyProperty(idl, "HTMLButtonElement", function() {3500 return new IDLInterface({3501 name: "HTMLButtonElement",3502 superclass: idl.HTMLElement,3503 members: {3504 get autofocus() {3505 return unwrap(this).autofocus;3506 },3507 set autofocus(newval) {3508 unwrap(this).autofocus = Boolean(newval);3509 },3510 get disabled() {3511 return unwrap(this).disabled;3512 },3513 set disabled(newval) {3514 unwrap(this).disabled = Boolean(newval);3515 },3516 get form() {3517 return wrap(unwrap(this).form);3518 },3519 get formAction() {3520 return unwrap(this).formAction;3521 },3522 set formAction(newval) {3523 unwrap(this).formAction = String(newval);3524 },3525 get formEnctype() {3526 return unwrap(this).formEnctype;3527 },3528 set formEnctype(newval) {3529 unwrap(this).formEnctype = String(newval);3530 },3531 get formMethod() {3532 return unwrap(this).formMethod;3533 },3534 set formMethod(newval) {3535 unwrap(this).formMethod = String(newval);3536 },3537 get formNoValidate() {3538 return unwrap(this).formNoValidate;3539 },3540 set formNoValidate(newval) {3541 unwrap(this).formNoValidate = Boolean(newval);3542 },3543 get formTarget() {3544 return unwrap(this).formTarget;3545 },3546 set formTarget(newval) {3547 unwrap(this).formTarget = String(newval);3548 },3549 get name() {3550 return unwrap(this).name;3551 },3552 set name(newval) {3553 unwrap(this).name = String(newval);3554 },3555 get type() {3556 return unwrap(this).type;3557 },3558 set type(newval) {3559 unwrap(this).type = String(newval);3560 },3561 get value() {3562 return unwrap(this).value;3563 },3564 set value(newval) {3565 unwrap(this).value = String(newval);3566 },3567 get willValidate() {3568 return unwrap(this).willValidate;3569 },3570 get validity() {3571 return wrap(unwrap(this).validity);3572 },3573 get validationMessage() {3574 return unwrap(this).validationMessage;3575 },3576 checkValidity: function checkValidity() {3577 return unwrap(this).checkValidity();3578 },3579 setCustomValidity: function setCustomValidity(error) {3580 unwrap(this).setCustomValidity(String(error));3581 },3582 get labels() {3583 return wrap(unwrap(this).labels);3584 },3585 },3586 });3587});3588//3589// Interface HTMLSelectElement3590//3591defineLazyProperty(global, "HTMLSelectElement", function() {3592 return idl.HTMLSelectElement.publicInterface;3593}, true);3594defineLazyProperty(idl, "HTMLSelectElement", function() {3595 return new IDLInterface({3596 name: "HTMLSelectElement",3597 superclass: idl.HTMLElement,3598 members: {3599 get autofocus() {3600 return unwrap(this).autofocus;3601 },3602 set autofocus(newval) {3603 unwrap(this).autofocus = Boolean(newval);3604 },3605 get disabled() {3606 return unwrap(this).disabled;3607 },3608 set disabled(newval) {3609 unwrap(this).disabled = Boolean(newval);3610 },3611 get form() {3612 return wrap(unwrap(this).form);3613 },3614 get multiple() {3615 return unwrap(this).multiple;3616 },3617 set multiple(newval) {3618 unwrap(this).multiple = Boolean(newval);3619 },3620 get name() {3621 return unwrap(this).name;3622 },3623 set name(newval) {3624 unwrap(this).name = String(newval);3625 },3626 get required() {3627 return unwrap(this).required;3628 },3629 set required(newval) {3630 unwrap(this).required = Boolean(newval);3631 },3632 get size() {3633 return unwrap(this).size;3634 },3635 set size(newval) {3636 unwrap(this).size = toULong(newval);3637 },3638 get type() {3639 return unwrap(this).type;3640 },3641 get options() {3642 return wrap(unwrap(this).options);3643 },3644 get length() {3645 return unwrap(this).length;3646 },3647 set length(newval) {3648 unwrap(this).length = toULong(newval);3649 },3650 namedItem: function namedItem(name) {3651 return unwrap(this).namedItem(String(name));3652 },3653 remove: function remove(index) {3654 unwrap(this).remove(toLong(index));3655 },3656 get selectedOptions() {3657 return wrap(unwrap(this).selectedOptions);3658 },3659 get selectedIndex() {3660 return unwrap(this).selectedIndex;3661 },3662 set selectedIndex(newval) {3663 unwrap(this).selectedIndex = toLong(newval);3664 },3665 get value() {3666 return unwrap(this).value;3667 },3668 set value(newval) {3669 unwrap(this).value = String(newval);3670 },3671 get willValidate() {3672 return unwrap(this).willValidate;3673 },3674 get validity() {3675 return wrap(unwrap(this).validity);3676 },3677 get validationMessage() {3678 return unwrap(this).validationMessage;3679 },3680 checkValidity: function checkValidity() {3681 return unwrap(this).checkValidity();3682 },3683 setCustomValidity: function setCustomValidity(error) {3684 unwrap(this).setCustomValidity(String(error));3685 },3686 get labels() {3687 return wrap(unwrap(this).labels);3688 },3689 },3690 });3691});3692//3693// Interface HTMLDataListElement3694//3695defineLazyProperty(global, "HTMLDataListElement", function() {3696 return idl.HTMLDataListElement.publicInterface;3697}, true);3698defineLazyProperty(idl, "HTMLDataListElement", function() {3699 return new IDLInterface({3700 name: "HTMLDataListElement",3701 superclass: idl.HTMLElement,3702 members: {3703 get options() {3704 return wrap(unwrap(this).options);3705 },3706 },3707 });3708});3709//3710// Interface HTMLOptGroupElement3711//3712defineLazyProperty(global, "HTMLOptGroupElement", function() {3713 return idl.HTMLOptGroupElement.publicInterface;3714}, true);3715defineLazyProperty(idl, "HTMLOptGroupElement", function() {3716 return new IDLInterface({3717 name: "HTMLOptGroupElement",3718 superclass: idl.HTMLElement,3719 members: {3720 get disabled() {3721 return unwrap(this).disabled;3722 },3723 set disabled(newval) {3724 unwrap(this).disabled = Boolean(newval);3725 },3726 get label() {3727 return unwrap(this).label;3728 },3729 set label(newval) {3730 unwrap(this).label = String(newval);3731 },3732 },3733 });3734});3735//3736// Interface HTMLOptionElement3737//3738defineLazyProperty(global, "HTMLOptionElement", function() {3739 return idl.HTMLOptionElement.publicInterface;3740}, true);3741defineLazyProperty(idl, "HTMLOptionElement", function() {3742 return new IDLInterface({3743 name: "HTMLOptionElement",3744 superclass: idl.HTMLElement,3745 members: {3746 get disabled() {3747 return unwrap(this).disabled;3748 },3749 set disabled(newval) {3750 unwrap(this).disabled = Boolean(newval);3751 },3752 get form() {3753 return wrap(unwrap(this).form);3754 },3755 get label() {3756 return unwrap(this).label;3757 },3758 set label(newval) {3759 unwrap(this).label = String(newval);3760 },3761 get defaultSelected() {3762 return unwrap(this).defaultSelected;3763 },3764 set defaultSelected(newval) {3765 unwrap(this).defaultSelected = Boolean(newval);3766 },3767 get selected() {3768 return unwrap(this).selected;3769 },3770 set selected(newval) {3771 unwrap(this).selected = Boolean(newval);3772 },3773 get value() {3774 return unwrap(this).value;3775 },3776 set value(newval) {3777 unwrap(this).value = String(newval);3778 },3779 get text() {3780 return unwrap(this).text;3781 },3782 set text(newval) {3783 unwrap(this).text = String(newval);3784 },3785 get index() {3786 return unwrap(this).index;3787 },3788 },3789 });3790});3791//3792// Interface HTMLTextAreaElement3793//3794defineLazyProperty(global, "HTMLTextAreaElement", function() {3795 return idl.HTMLTextAreaElement.publicInterface;3796}, true);3797defineLazyProperty(idl, "HTMLTextAreaElement", function() {3798 return new IDLInterface({3799 name: "HTMLTextAreaElement",3800 superclass: idl.HTMLElement,3801 members: {3802 get autofocus() {3803 return unwrap(this).autofocus;3804 },3805 set autofocus(newval) {3806 unwrap(this).autofocus = Boolean(newval);3807 },3808 get cols() {3809 return unwrap(this).cols;3810 },3811 set cols(newval) {3812 unwrap(this).cols = toULong(newval);3813 },3814 get dirName() {3815 return unwrap(this).dirName;3816 },3817 set dirName(newval) {3818 unwrap(this).dirName = String(newval);3819 },3820 get disabled() {3821 return unwrap(this).disabled;3822 },3823 set disabled(newval) {3824 unwrap(this).disabled = Boolean(newval);3825 },3826 get form() {3827 return wrap(unwrap(this).form);3828 },3829 get maxLength() {3830 return unwrap(this).maxLength;3831 },3832 set maxLength(newval) {3833 unwrap(this).maxLength = toLong(newval);3834 },3835 get name() {3836 return unwrap(this).name;3837 },3838 set name(newval) {3839 unwrap(this).name = String(newval);3840 },3841 get placeholder() {3842 return unwrap(this).placeholder;3843 },3844 set placeholder(newval) {3845 unwrap(this).placeholder = String(newval);3846 },3847 get readOnly() {3848 return unwrap(this).readOnly;3849 },3850 set readOnly(newval) {3851 unwrap(this).readOnly = Boolean(newval);3852 },3853 get required() {3854 return unwrap(this).required;3855 },3856 set required(newval) {3857 unwrap(this).required = Boolean(newval);3858 },3859 get rows() {3860 return unwrap(this).rows;3861 },3862 set rows(newval) {3863 unwrap(this).rows = toULong(newval);3864 },3865 get wrap() {3866 return unwrap(this).wrap;3867 },3868 set wrap(newval) {3869 unwrap(this).wrap = String(newval);3870 },3871 get type() {3872 return unwrap(this).type;3873 },3874 get defaultValue() {3875 return unwrap(this).defaultValue;3876 },3877 set defaultValue(newval) {3878 unwrap(this).defaultValue = String(newval);3879 },3880 get value() {3881 return unwrap(this).value;3882 },3883 set value(newval) {3884 unwrap(this).value = String(newval);3885 },3886 get textLength() {3887 return unwrap(this).textLength;3888 },3889 get willValidate() {3890 return unwrap(this).willValidate;3891 },3892 get validity() {3893 return wrap(unwrap(this).validity);3894 },3895 get validationMessage() {3896 return unwrap(this).validationMessage;3897 },3898 checkValidity: function checkValidity() {3899 return unwrap(this).checkValidity();3900 },3901 setCustomValidity: function setCustomValidity(error) {3902 unwrap(this).setCustomValidity(String(error));3903 },3904 get labels() {3905 return wrap(unwrap(this).labels);3906 },3907 select: function select() {3908 unwrap(this).select();3909 },3910 get selectionStart() {3911 return unwrap(this).selectionStart;3912 },3913 set selectionStart(newval) {3914 unwrap(this).selectionStart = toULong(newval);3915 },3916 get selectionEnd() {3917 return unwrap(this).selectionEnd;3918 },3919 set selectionEnd(newval) {3920 unwrap(this).selectionEnd = toULong(newval);3921 },3922 get selectionDirection() {3923 return unwrap(this).selectionDirection;3924 },3925 set selectionDirection(newval) {3926 unwrap(this).selectionDirection = String(newval);3927 },3928 setSelectionRange: function setSelectionRange(3929 start,3930 end,3931 direction)3932 {3933 unwrap(this).setSelectionRange(3934 toULong(start),3935 toULong(end),3936 OptionalString(direction));3937 },3938 },3939 });3940});3941//3942// Interface HTMLKeygenElement3943//3944defineLazyProperty(global, "HTMLKeygenElement", function() {3945 return idl.HTMLKeygenElement.publicInterface;3946}, true);3947defineLazyProperty(idl, "HTMLKeygenElement", function() {3948 return new IDLInterface({3949 name: "HTMLKeygenElement",3950 superclass: idl.HTMLElement,3951 members: {3952 get autofocus() {3953 return unwrap(this).autofocus;3954 },3955 set autofocus(newval) {3956 unwrap(this).autofocus = Boolean(newval);3957 },3958 get challenge() {3959 return unwrap(this).challenge;3960 },3961 set challenge(newval) {3962 unwrap(this).challenge = String(newval);3963 },3964 get disabled() {3965 return unwrap(this).disabled;3966 },3967 set disabled(newval) {3968 unwrap(this).disabled = Boolean(newval);3969 },3970 get form() {3971 return wrap(unwrap(this).form);3972 },3973 get keytype() {3974 return unwrap(this).keytype;3975 },3976 set keytype(newval) {3977 unwrap(this).keytype = String(newval);3978 },3979 get name() {3980 return unwrap(this).name;3981 },3982 set name(newval) {3983 unwrap(this).name = String(newval);3984 },3985 get type() {3986 return unwrap(this).type;3987 },3988 get willValidate() {3989 return unwrap(this).willValidate;3990 },3991 get validity() {3992 return wrap(unwrap(this).validity);3993 },3994 get validationMessage() {3995 return unwrap(this).validationMessage;3996 },3997 checkValidity: function checkValidity() {3998 return unwrap(this).checkValidity();3999 },4000 setCustomValidity: function setCustomValidity(error) {4001 unwrap(this).setCustomValidity(String(error));4002 },4003 get labels() {4004 return wrap(unwrap(this).labels);4005 },4006 },4007 });4008});4009//4010// Interface HTMLOutputElement4011//4012defineLazyProperty(global, "HTMLOutputElement", function() {4013 return idl.HTMLOutputElement.publicInterface;4014}, true);4015defineLazyProperty(idl, "HTMLOutputElement", function() {4016 return new IDLInterface({4017 name: "HTMLOutputElement",4018 superclass: idl.HTMLElement,4019 members: {4020 get htmlFor() {4021 return wrap(unwrap(this).htmlFor);4022 },4023 get form() {4024 return wrap(unwrap(this).form);4025 },4026 get name() {4027 return unwrap(this).name;4028 },4029 set name(newval) {4030 unwrap(this).name = String(newval);4031 },4032 get type() {4033 return unwrap(this).type;4034 },4035 get defaultValue() {4036 return unwrap(this).defaultValue;4037 },4038 set defaultValue(newval) {4039 unwrap(this).defaultValue = String(newval);4040 },4041 get value() {4042 return unwrap(this).value;4043 },4044 set value(newval) {4045 unwrap(this).value = String(newval);4046 },4047 get willValidate() {4048 return unwrap(this).willValidate;4049 },4050 get validity() {4051 return wrap(unwrap(this).validity);4052 },4053 get validationMessage() {4054 return unwrap(this).validationMessage;4055 },4056 checkValidity: function checkValidity() {4057 return unwrap(this).checkValidity();4058 },4059 setCustomValidity: function setCustomValidity(error) {4060 unwrap(this).setCustomValidity(String(error));4061 },4062 get labels() {4063 return wrap(unwrap(this).labels);4064 },4065 },4066 });4067});4068//4069// Interface HTMLProgressElement4070//4071defineLazyProperty(global, "HTMLProgressElement", function() {4072 return idl.HTMLProgressElement.publicInterface;4073}, true);4074defineLazyProperty(idl, "HTMLProgressElement", function() {4075 return new IDLInterface({4076 name: "HTMLProgressElement",4077 superclass: idl.HTMLElement,4078 members: {4079 get value() {4080 return unwrap(this).value;4081 },4082 set value(newval) {4083 unwrap(this).value = toDouble(newval);4084 },4085 get max() {4086 return unwrap(this).max;4087 },4088 set max(newval) {4089 unwrap(this).max = toDouble(newval);4090 },4091 get position() {4092 return unwrap(this).position;4093 },4094 get labels() {4095 return wrap(unwrap(this).labels);4096 },4097 },4098 });4099});4100//4101// Interface HTMLMeterElement4102//4103defineLazyProperty(global, "HTMLMeterElement", function() {4104 return idl.HTMLMeterElement.publicInterface;4105}, true);4106defineLazyProperty(idl, "HTMLMeterElement", function() {4107 return new IDLInterface({4108 name: "HTMLMeterElement",4109 superclass: idl.HTMLElement,4110 members: {4111 get value() {4112 return unwrap(this).value;4113 },4114 set value(newval) {4115 unwrap(this).value = toDouble(newval);4116 },4117 get min() {4118 return unwrap(this).min;4119 },4120 set min(newval) {4121 unwrap(this).min = toDouble(newval);4122 },4123 get max() {4124 return unwrap(this).max;4125 },4126 set max(newval) {4127 unwrap(this).max = toDouble(newval);4128 },4129 get low() {4130 return unwrap(this).low;4131 },4132 set low(newval) {4133 unwrap(this).low = toDouble(newval);4134 },4135 get high() {4136 return unwrap(this).high;4137 },4138 set high(newval) {4139 unwrap(this).high = toDouble(newval);4140 },4141 get optimum() {4142 return unwrap(this).optimum;4143 },4144 set optimum(newval) {4145 unwrap(this).optimum = toDouble(newval);4146 },4147 get labels() {4148 return wrap(unwrap(this).labels);4149 },4150 },4151 });4152});4153//4154// Interface ValidityState4155//4156defineLazyProperty(global, "ValidityState", function() {4157 return idl.ValidityState.publicInterface;4158}, true);4159defineLazyProperty(idl, "ValidityState", function() {4160 return new IDLInterface({4161 name: "ValidityState",4162 members: {4163 get valueMissing() {4164 return unwrap(this).valueMissing;4165 },4166 get typeMismatch() {4167 return unwrap(this).typeMismatch;4168 },4169 get patternMismatch() {4170 return unwrap(this).patternMismatch;4171 },4172 get tooLong() {4173 return unwrap(this).tooLong;4174 },4175 get rangeUnderflow() {4176 return unwrap(this).rangeUnderflow;4177 },4178 get rangeOverflow() {4179 return unwrap(this).rangeOverflow;4180 },4181 get stepMismatch() {4182 return unwrap(this).stepMismatch;4183 },4184 get customError() {4185 return unwrap(this).customError;4186 },4187 get valid() {4188 return unwrap(this).valid;4189 },4190 },4191 });4192});4193//4194// Interface HTMLDetailsElement4195//4196defineLazyProperty(global, "HTMLDetailsElement", function() {4197 return idl.HTMLDetailsElement.publicInterface;4198}, true);4199defineLazyProperty(idl, "HTMLDetailsElement", function() {4200 return new IDLInterface({4201 name: "HTMLDetailsElement",4202 superclass: idl.HTMLElement,4203 members: {4204 get open() {4205 return unwrap(this).open;4206 },4207 set open(newval) {4208 unwrap(this).open = Boolean(newval);4209 },4210 },4211 });4212});4213//4214// Interface HTMLCommandElement4215//4216defineLazyProperty(global, "HTMLCommandElement", function() {4217 return idl.HTMLCommandElement.publicInterface;4218}, true);4219defineLazyProperty(idl, "HTMLCommandElement", function() {4220 return new IDLInterface({4221 name: "HTMLCommandElement",4222 superclass: idl.HTMLElement,4223 members: {4224 get type() {4225 return unwrap(this).type;4226 },4227 set type(newval) {4228 unwrap(this).type = String(newval);4229 },4230 get label() {4231 return unwrap(this).label;4232 },4233 set label(newval) {4234 unwrap(this).label = String(newval);4235 },4236 get icon() {4237 return unwrap(this).icon;4238 },4239 set icon(newval) {4240 unwrap(this).icon = String(newval);4241 },4242 get disabled() {4243 return unwrap(this).disabled;4244 },4245 set disabled(newval) {4246 unwrap(this).disabled = Boolean(newval);4247 },4248 get checked() {4249 return unwrap(this).checked;4250 },4251 set checked(newval) {4252 unwrap(this).checked = Boolean(newval);4253 },4254 get radiogroup() {4255 return unwrap(this).radiogroup;4256 },4257 set radiogroup(newval) {4258 unwrap(this).radiogroup = String(newval);4259 },4260 },4261 });4262});4263//4264// Interface HTMLMenuElement4265//4266defineLazyProperty(global, "HTMLMenuElement", function() {4267 return idl.HTMLMenuElement.publicInterface;4268}, true);4269defineLazyProperty(idl, "HTMLMenuElement", function() {4270 return new IDLInterface({4271 name: "HTMLMenuElement",4272 superclass: idl.HTMLElement,4273 members: {4274 get type() {4275 return unwrap(this).type;4276 },4277 set type(newval) {4278 unwrap(this).type = String(newval);4279 },4280 get label() {4281 return unwrap(this).label;4282 },4283 set label(newval) {4284 unwrap(this).label = String(newval);4285 },4286 },4287 });4288});4289//4290// Interface HTMLFrameSetElement4291//4292defineLazyProperty(global, "HTMLFrameSetElement", function() {4293 return idl.HTMLFrameSetElement.publicInterface;4294}, true);4295defineLazyProperty(idl, "HTMLFrameSetElement", function() {4296 return new IDLInterface({4297 name: "HTMLFrameSetElement",4298 superclass: idl.HTMLElement,4299 members: {4300 get cols() {4301 return unwrap(this).cols;4302 },4303 set cols(newval) {4304 unwrap(this).cols = String(newval);4305 },4306 get rows() {4307 return unwrap(this).rows;4308 },4309 set rows(newval) {4310 unwrap(this).rows = String(newval);4311 },4312 get onafterprint() {4313 return unwrap(this).onafterprint;4314 },4315 set onafterprint(newval) {4316 unwrap(this).onafterprint = toCallbackOrNull(newval);4317 },4318 get onbeforeprint() {4319 return unwrap(this).onbeforeprint;4320 },4321 set onbeforeprint(newval) {4322 unwrap(this).onbeforeprint = toCallbackOrNull(newval);4323 },4324 get onbeforeunload() {4325 return unwrap(this).onbeforeunload;4326 },4327 set onbeforeunload(newval) {4328 unwrap(this).onbeforeunload = toCallbackOrNull(newval);4329 },4330 get onblur() {4331 return unwrap(this).onblur;4332 },4333 set onblur(newval) {4334 unwrap(this).onblur = toCallbackOrNull(newval);4335 },4336 get onerror() {4337 return unwrap(this).onerror;4338 },4339 set onerror(newval) {4340 unwrap(this).onerror = toCallbackOrNull(newval);4341 },4342 get onfocus() {4343 return unwrap(this).onfocus;4344 },4345 set onfocus(newval) {4346 unwrap(this).onfocus = toCallbackOrNull(newval);4347 },4348 get onhashchange() {4349 return unwrap(this).onhashchange;4350 },4351 set onhashchange(newval) {4352 unwrap(this).onhashchange = toCallbackOrNull(newval);4353 },4354 get onload() {4355 return unwrap(this).onload;4356 },4357 set onload(newval) {4358 unwrap(this).onload = toCallbackOrNull(newval);4359 },4360 get onmessage() {4361 return unwrap(this).onmessage;4362 },4363 set onmessage(newval) {4364 unwrap(this).onmessage = toCallbackOrNull(newval);4365 },4366 get onoffline() {4367 return unwrap(this).onoffline;4368 },4369 set onoffline(newval) {4370 unwrap(this).onoffline = toCallbackOrNull(newval);4371 },4372 get ononline() {4373 return unwrap(this).ononline;4374 },4375 set ononline(newval) {4376 unwrap(this).ononline = toCallbackOrNull(newval);4377 },4378 get onpagehide() {4379 return unwrap(this).onpagehide;4380 },4381 set onpagehide(newval) {4382 unwrap(this).onpagehide = toCallbackOrNull(newval);4383 },4384 get onpageshow() {4385 return unwrap(this).onpageshow;4386 },4387 set onpageshow(newval) {4388 unwrap(this).onpageshow = toCallbackOrNull(newval);4389 },4390 get onpopstate() {4391 return unwrap(this).onpopstate;4392 },4393 set onpopstate(newval) {4394 unwrap(this).onpopstate = toCallbackOrNull(newval);4395 },4396 get onresize() {4397 return unwrap(this).onresize;4398 },4399 set onresize(newval) {4400 unwrap(this).onresize = toCallbackOrNull(newval);4401 },4402 get onscroll() {4403 return unwrap(this).onscroll;4404 },4405 set onscroll(newval) {4406 unwrap(this).onscroll = toCallbackOrNull(newval);4407 },4408 get onstorage() {4409 return unwrap(this).onstorage;4410 },4411 set onstorage(newval) {4412 unwrap(this).onstorage = toCallbackOrNull(newval);4413 },4414 get onunload() {4415 return unwrap(this).onunload;4416 },4417 set onunload(newval) {4418 unwrap(this).onunload = toCallbackOrNull(newval);4419 },4420 },4421 });4422});4423//4424// Interface HTMLFrameElement4425//4426defineLazyProperty(global, "HTMLFrameElement", function() {4427 return idl.HTMLFrameElement.publicInterface;4428}, true);4429defineLazyProperty(idl, "HTMLFrameElement", function() {4430 return new IDLInterface({4431 name: "HTMLFrameElement",4432 superclass: idl.HTMLElement,4433 members: {4434 get name() {4435 return unwrap(this).name;4436 },4437 set name(newval) {4438 unwrap(this).name = String(newval);4439 },4440 get scrolling() {4441 return unwrap(this).scrolling;4442 },4443 set scrolling(newval) {4444 unwrap(this).scrolling = String(newval);4445 },4446 get src() {4447 return unwrap(this).src;4448 },4449 set src(newval) {4450 unwrap(this).src = String(newval);4451 },4452 get frameBorder() {4453 return unwrap(this).frameBorder;4454 },4455 set frameBorder(newval) {4456 unwrap(this).frameBorder = String(newval);4457 },4458 get longDesc() {4459 return unwrap(this).longDesc;4460 },4461 set longDesc(newval) {4462 unwrap(this).longDesc = String(newval);4463 },4464 get noResize() {4465 return unwrap(this).noResize;4466 },4467 set noResize(newval) {4468 unwrap(this).noResize = Boolean(newval);4469 },4470 get contentDocument() {4471 return wrap(unwrap(this).contentDocument);4472 },4473 get contentWindow() {4474 return wrap(unwrap(this).contentWindow);4475 },4476 get marginHeight() {4477 return unwrap(this).marginHeight;4478 },4479 set marginHeight(newval) {4480 unwrap(this).marginHeight = StringOrEmpty(newval);4481 },4482 get marginWidth() {4483 return unwrap(this).marginWidth;4484 },4485 set marginWidth(newval) {4486 unwrap(this).marginWidth = StringOrEmpty(newval);4487 },4488 },4489 });...

Full Screen

Full Screen

idlharness.js

Source:idlharness.js Github

copy

Full Screen

...403 switch(parsed_idl.type)404 {405 case "interface":406 this.members[parsed_idl.name] =407 new IdlInterface(parsed_idl, /* is_callback = */ false, /* is_mixin = */ false);408 break;409 case "interface mixin":410 this.members[parsed_idl.name] =411 new IdlInterface(parsed_idl, /* is_callback = */ false, /* is_mixin = */ true);412 break;413 case "dictionary":414 // Nothing to test, but we need the dictionary info around for type415 // checks416 this.members[parsed_idl.name] = new IdlDictionary(parsed_idl);417 break;418 case "typedef":419 this.members[parsed_idl.name] = new IdlTypedef(parsed_idl);420 break;421 case "callback":422 // TODO423 console.log("callback not yet supported");424 break;425 case "enum":426 this.members[parsed_idl.name] = new IdlEnum(parsed_idl);427 break;428 case "callback interface":429 this.members[parsed_idl.name] =430 new IdlInterface(parsed_idl, /* is_callback = */ true, /* is_mixin = */ false);431 break;432 case "namespace":433 this.members[parsed_idl.name] = new IdlNamespace(parsed_idl);434 break;435 default:436 throw parsed_idl.name + ": " + parsed_idl.type + " not yet supported";437 }438 }.bind(this));439};440IdlArray.prototype.add_objects = function(dict)441{442 /** Entry point. See documentation at beginning of file. */443 for (var k in dict)444 {445 if (k in this.objects)446 {447 this.objects[k] = this.objects[k].concat(dict[k]);448 }449 else450 {451 this.objects[k] = dict[k];452 }453 }454};455IdlArray.prototype.prevent_multiple_testing = function(name)456{457 /** Entry point. See documentation at beginning of file. */458 this.members[name].prevent_multiple_testing = true;459};460IdlArray.prototype.recursively_get_implements = function(interface_name)461{462 /**463 * Helper function for test(). Returns an array of things that implement464 * interface_name, so if the IDL contains465 *466 * A implements B;467 * B implements C;468 * B implements D;469 *470 * then recursively_get_implements("A") should return ["B", "C", "D"].471 */472 var ret = this["implements"][interface_name];473 if (ret === undefined)474 {475 return [];476 }477 for (var i = 0; i < this["implements"][interface_name].length; i++)478 {479 ret = ret.concat(this.recursively_get_implements(ret[i]));480 if (ret.indexOf(ret[i]) != ret.lastIndexOf(ret[i]))481 {482 throw new IdlHarnessError("Circular implements statements involving " + ret[i]);483 }484 }485 return ret;486};487IdlArray.prototype.recursively_get_includes = function(interface_name)488{489 /**490 * Helper function for test(). Returns an array of things that implement491 * interface_name, so if the IDL contains492 *493 * A includes B;494 * B includes C;495 * B includes D;496 *497 * then recursively_get_includes("A") should return ["B", "C", "D"].498 */499 var ret = this["includes"][interface_name];500 if (ret === undefined)501 {502 return [];503 }504 for (var i = 0; i < this["includes"][interface_name].length; i++)505 {506 ret = ret.concat(this.recursively_get_includes(ret[i]));507 if (ret.indexOf(ret[i]) != ret.lastIndexOf(ret[i]))508 {509 throw new IdlHarnessError("Circular includes statements involving " + ret[i]);510 }511 }512 return ret;513};514IdlArray.prototype.is_json_type = function(type)515{516 /**517 * Checks whether type is a JSON type as per518 * https://heycam.github.io/webidl/#dfn-json-types519 */520 var idlType = type.idlType;521 if (type.generic == "Promise") { return false; }522 // nullable and annotated types don't need to be handled separately,523 // as webidl2 doesn't represent them wrapped-up (as they're described524 // in WebIDL).525 // union and record types526 if (type.union || type.generic == "record") {527 return idlType.every(this.is_json_type, this);528 }529 // sequence types530 if (type.generic == "sequence" || type.generic == "FrozenArray") {531 return this.is_json_type(idlType);532 }533 if (typeof idlType != "string") { throw new Error("Unexpected type " + JSON.stringify(idlType)); }534 switch (idlType)535 {536 // Numeric types537 case "byte":538 case "octet":539 case "short":540 case "unsigned short":541 case "long":542 case "unsigned long":543 case "long long":544 case "unsigned long long":545 case "float":546 case "double":547 case "unrestricted float":548 case "unrestricted double":549 // boolean550 case "boolean":551 // string types552 case "DOMString":553 case "ByteString":554 case "USVString":555 // object type556 case "object":557 return true;558 case "Error":559 case "DOMException":560 case "Int8Array":561 case "Int16Array":562 case "Int32Array":563 case "Uint8Array":564 case "Uint16Array":565 case "Uint32Array":566 case "Uint8ClampedArray":567 case "Float32Array":568 case "ArrayBuffer":569 case "DataView":570 case "any":571 return false;572 default:573 var thing = this.members[idlType];574 if (!thing) { throw new Error("Type " + idlType + " not found"); }575 if (thing instanceof IdlEnum) { return true; }576 if (thing instanceof IdlTypedef) {577 return this.is_json_type(thing.idlType);578 }579 // dictionaries where all of their members are JSON types580 if (thing instanceof IdlDictionary) {581 var stack = thing.get_inheritance_stack();582 var map = new Map();583 while (stack.length)584 {585 stack.pop().members.forEach(function(m) {586 map.set(m.name, m.idlType)587 });588 }589 return Array.from(map.values()).every(this.is_json_type, this);590 }591 // interface types that have a toJSON operation declared on themselves or592 // one of their inherited or consequential interfaces.593 if (thing instanceof IdlInterface) {594 var base;595 while (thing)596 {597 if (thing.has_to_json_regular_operation()) { return true; }598 var mixins = this.implements[thing.name] || this.includes[thing.name];599 if (mixins) {600 mixins = mixins.map(function(id) {601 var mixin = this.members[id];602 if (!mixin) {603 throw new Error("Interface " + id + " not found (implemented by " + thing.name + ")");604 }605 return mixin;606 }, this);607 if (mixins.some(function(m) { return m.has_to_json_regular_operation() } )) { return true; }608 }609 if (!thing.base) { return false; }610 base = this.members[thing.base];611 if (!base) {612 throw new Error("Interface " + thing.base + " not found (inherited by " + thing.name + ")");613 }614 thing = base;615 }616 return false;617 }618 return false;619 }620};621function exposure_set(object, default_set) {622 var exposed = object.extAttrs && object.extAttrs.filter(a => a.name === "Exposed");623 if (exposed && exposed.length > 1) {624 throw new IdlHarnessError(625 `Multiple 'Exposed' extended attributes on ${object.name}`);626 }627 let result = default_set || ["Window"];628 if (result && !(result instanceof Set)) {629 result = new Set(result);630 }631 if (exposed && exposed.length) {632 var set = exposed[0].rhs.value;633 // Could be a list or a string.634 if (typeof set == "string") {635 set = [ set ];636 }637 result = new Set(set);638 }639 if (result && result.has("Worker")) {640 result.delete("Worker");641 result.add("DedicatedWorker");642 result.add("ServiceWorker");643 result.add("SharedWorker");644 }645 return result;646}647function exposed_in(globals) {648 if ('document' in self) {649 return globals.has("Window");650 }651 if ('DedicatedWorkerGlobalScope' in self &&652 self instanceof DedicatedWorkerGlobalScope) {653 return globals.has("DedicatedWorker");654 }655 if ('SharedWorkerGlobalScope' in self &&656 self instanceof SharedWorkerGlobalScope) {657 return globals.has("SharedWorker");658 }659 if ('ServiceWorkerGlobalScope' in self &&660 self instanceof ServiceWorkerGlobalScope) {661 return globals.has("ServiceWorker");662 }663 throw new IdlHarnessError("Unexpected global object");664}665/**666 * Asserts that the given error message is thrown for the given function.667 * @param {string|IdlHarnessError} error Expected Error message.668 * @param {Function} idlArrayFunc Function operating on an IdlArray that should throw.669 */670IdlArray.prototype.assert_throws = function(error, idlArrayFunc)671{672 try {673 idlArrayFunc.call(this, this);674 } catch (e) {675 if (e instanceof AssertionError) {676 throw e;677 }678 // Assertions for behaviour of the idlharness.js engine.679 if (error instanceof IdlHarnessError) {680 error = error.message;681 }682 if (e.message !== error) {683 throw new IdlHarnessError(`${idlArrayFunc} threw "${e}", not the expected IdlHarnessError "${error}"`);684 }685 return;686 }687 throw new IdlHarnessError(`${idlArrayFunc} did not throw the expected IdlHarnessError`);688}689IdlArray.prototype.test = function()690{691 /** Entry point. See documentation at beginning of file. */692 // First merge in all the partial interfaces and implements statements we693 // encountered.694 this.collapse_partials();695 for (var lhs in this["implements"])696 {697 this.recursively_get_implements(lhs).forEach(function(rhs)698 {699 var errStr = lhs + " implements " + rhs + ", but ";700 if (!(lhs in this.members)) throw errStr + lhs + " is undefined.";701 if (!(this.members[lhs] instanceof IdlInterface)) throw errStr + lhs + " is not an interface.";702 if (!(rhs in this.members)) throw errStr + rhs + " is undefined.";703 if (!(this.members[rhs] instanceof IdlInterface)) throw errStr + rhs + " is not an interface.";704 this.members[rhs].members.forEach(function(member)705 {706 this.members[lhs].members.push(new IdlInterfaceMember(member));707 }.bind(this));708 }.bind(this));709 }710 this["implements"] = {};711 for (var lhs in this["includes"])712 {713 this.recursively_get_includes(lhs).forEach(function(rhs)714 {715 var errStr = lhs + " includes " + rhs + ", but ";716 if (!(lhs in this.members)) throw errStr + lhs + " is undefined.";717 if (!(this.members[lhs] instanceof IdlInterface)) throw errStr + lhs + " is not an interface.";718 if (!(rhs in this.members)) throw errStr + rhs + " is undefined.";719 if (!(this.members[rhs] instanceof IdlInterface)) throw errStr + rhs + " is not an interface.";720 this.members[rhs].members.forEach(function(member)721 {722 this.members[lhs].members.push(new IdlInterfaceMember(member));723 }.bind(this));724 }.bind(this));725 }726 this["includes"] = {};727 // Assert B defined for A : B728 for (const member of Object.values(this.members).filter(m => m.base)) {729 const lhs = member.name;730 const rhs = member.base;731 if (!(rhs in this.members)) throw new IdlHarnessError(`${lhs} inherits ${rhs}, but ${rhs} is undefined.`);732 const lhs_is_interface = this.members[lhs] instanceof IdlInterface;733 const rhs_is_interface = this.members[rhs] instanceof IdlInterface;734 if (rhs_is_interface != lhs_is_interface) {735 if (!lhs_is_interface) throw new IdlHarnessError(`${lhs} inherits ${rhs}, but ${lhs} is not an interface.`);736 if (!rhs_is_interface) throw new IdlHarnessError(`${lhs} inherits ${rhs}, but ${rhs} is not an interface.`);737 }738 // Check for circular dependencies.739 member.get_inheritance_stack();740 }741 Object.getOwnPropertyNames(this.members).forEach(function(memberName) {742 var member = this.members[memberName];743 if (!(member instanceof IdlInterface)) {744 return;745 }746 var globals = exposure_set(member);747 member.exposed = exposed_in(globals);748 member.exposureSet = globals;749 }.bind(this));750 // Now run test() on every member, and test_object() for every object.751 for (var name in this.members)752 {753 this.members[name].test();754 if (name in this.objects)755 {756 const objects = this.objects[name];757 if (!objects || !Array.isArray(objects)) {758 throw new IdlHarnessError(`Invalid or empty objects for member ${name}`);759 }760 objects.forEach(function(str)761 {762 if (!this.members[name] || !(this.members[name] instanceof IdlInterface)) {763 throw new IdlHarnessError(`Invalid object member name ${name}`);764 }765 this.members[name].test_object(str);766 }.bind(this));767 }768 }769};770IdlArray.prototype.collapse_partials = function()771{772 const testedPartials = new Map();773 this.partials.forEach(function(parsed_idl)774 {775 const originalExists = parsed_idl.name in this.members776 && (this.members[parsed_idl.name] instanceof IdlInterface777 || this.members[parsed_idl.name] instanceof IdlDictionary778 || this.members[parsed_idl.name] instanceof IdlNamespace);779 let partialTestName = parsed_idl.name;780 if (!parsed_idl.untested) {781 // Ensure unique test name in case of multiple partials.782 let partialTestCount = 1;783 if (testedPartials.has(parsed_idl.name)) {784 partialTestCount += testedPartials.get(parsed_idl.name);785 partialTestName = `${partialTestName}[${partialTestCount}]`;786 }787 testedPartials.set(parsed_idl.name, partialTestCount);788 test(function () {789 assert_true(originalExists, `Original ${parsed_idl.type} should be defined`);790 var expected = IdlInterface;791 switch (parsed_idl.type) {792 case 'interface': expected = IdlInterface; break;793 case 'dictionary': expected = IdlDictionary; break;794 case 'namespace': expected = IdlNamespace; break;795 }796 assert_true(797 expected.prototype.isPrototypeOf(this.members[parsed_idl.name]),798 `Original ${parsed_idl.name} definition should have type ${parsed_idl.type}`);799 }.bind(this), `Partial ${parsed_idl.type} ${partialTestName}: original ${parsed_idl.type} defined`);800 }801 if (!originalExists) {802 // Not good.. but keep calm and carry on.803 return;804 }805 if (parsed_idl.extAttrs)806 {807 // Special-case "Exposed". Must be a subset of original interface's exposure.808 // Exposed on a partial is the equivalent of having the same Exposed on all nested members.809 // See https://github.com/heycam/webidl/issues/154 for discrepency between Exposed and810 // other extended attributes on partial interfaces.811 const exposureAttr = parsed_idl.extAttrs.find(a => a.name === "Exposed");812 if (exposureAttr) {813 if (!parsed_idl.untested) {814 test(function () {815 const partialExposure = exposure_set(parsed_idl);816 const memberExposure = exposure_set(this.members[parsed_idl.name]);817 partialExposure.forEach(name => {818 if (!memberExposure || !memberExposure.has(name)) {819 throw new IdlHarnessError(820 `Partial ${parsed_idl.name} ${parsed_idl.type} is exposed to '${name}', the original ${parsed_idl.type} is not.`);821 }822 });823 }.bind(this), `Partial ${parsed_idl.type} ${partialTestName}: valid exposure set`);824 }825 parsed_idl.members.forEach(function (member) {826 member.extAttrs.push(exposureAttr);827 }.bind(this));828 }829 parsed_idl.extAttrs.forEach(function(extAttr)830 {831 // "Exposed" already handled above.832 if (extAttr.name === "Exposed") {833 return;834 }835 this.members[parsed_idl.name].extAttrs.push(extAttr);836 }.bind(this));837 }838 parsed_idl.members.forEach(function(member)839 {840 this.members[parsed_idl.name].members.push(new IdlInterfaceMember(member));841 }.bind(this));842 }.bind(this));843 this.partials = [];844}845IdlArray.prototype.assert_type_is = function(value, type)846{847 if (type.idlType in this.members848 && this.members[type.idlType] instanceof IdlTypedef) {849 this.assert_type_is(value, this.members[type.idlType].idlType);850 return;851 }852 if (type.union) {853 for (var i = 0; i < type.idlType.length; i++) {854 try {855 this.assert_type_is(value, type.idlType[i]);856 // No AssertionError, so we match one type in the union857 return;858 } catch(e) {859 if (e instanceof AssertionError) {860 // We didn't match this type, let's try some others861 continue;862 }863 throw e;864 }865 }866 // TODO: Is there a nice way to list the union's types in the message?867 assert_true(false, "Attribute has value " + format_value(value)868 + " which doesn't match any of the types in the union");869 }870 /**871 * Helper function that tests that value is an instance of type according872 * to the rules of WebIDL. value is any JavaScript value, and type is an873 * object produced by WebIDLParser.js' "type" production. That production874 * is fairly elaborate due to the complexity of WebIDL's types, so it's875 * best to look at the grammar to figure out what properties it might have.876 */877 if (type.idlType == "any")878 {879 // No assertions to make880 return;881 }882 if (type.nullable && value === null)883 {884 // This is fine885 return;886 }887 if (type.array)888 {889 // TODO: not supported yet890 return;891 }892 if (type.generic === "sequence")893 {894 assert_true(Array.isArray(value), "should be an Array");895 if (!value.length)896 {897 // Nothing we can do.898 return;899 }900 this.assert_type_is(value[0], type.idlType);901 return;902 }903 if (type.generic === "Promise") {904 assert_true("then" in value, "Attribute with a Promise type should have a then property");905 // TODO: Ideally, we would check on project fulfillment906 // that we get the right type907 // but that would require making the type check async908 return;909 }910 if (type.generic === "FrozenArray") {911 assert_true(Array.isArray(value), "Value should be array");912 assert_true(Object.isFrozen(value), "Value should be frozen");913 if (!value.length)914 {915 // Nothing we can do.916 return;917 }918 this.assert_type_is(value[0], type.idlType);919 return;920 }921 type = type.idlType;922 switch(type)923 {924 case "void":925 assert_equals(value, undefined);926 return;927 case "boolean":928 assert_equals(typeof value, "boolean");929 return;930 case "byte":931 assert_equals(typeof value, "number");932 assert_equals(value, Math.floor(value), "should be an integer");933 assert_true(-128 <= value && value <= 127, "byte " + value + " should be in range [-128, 127]");934 return;935 case "octet":936 assert_equals(typeof value, "number");937 assert_equals(value, Math.floor(value), "should be an integer");938 assert_true(0 <= value && value <= 255, "octet " + value + " should be in range [0, 255]");939 return;940 case "short":941 assert_equals(typeof value, "number");942 assert_equals(value, Math.floor(value), "should be an integer");943 assert_true(-32768 <= value && value <= 32767, "short " + value + " should be in range [-32768, 32767]");944 return;945 case "unsigned short":946 assert_equals(typeof value, "number");947 assert_equals(value, Math.floor(value), "should be an integer");948 assert_true(0 <= value && value <= 65535, "unsigned short " + value + " should be in range [0, 65535]");949 return;950 case "long":951 assert_equals(typeof value, "number");952 assert_equals(value, Math.floor(value), "should be an integer");953 assert_true(-2147483648 <= value && value <= 2147483647, "long " + value + " should be in range [-2147483648, 2147483647]");954 return;955 case "unsigned long":956 assert_equals(typeof value, "number");957 assert_equals(value, Math.floor(value), "should be an integer");958 assert_true(0 <= value && value <= 4294967295, "unsigned long " + value + " should be in range [0, 4294967295]");959 return;960 case "long long":961 assert_equals(typeof value, "number");962 return;963 case "unsigned long long":964 case "DOMTimeStamp":965 assert_equals(typeof value, "number");966 assert_true(0 <= value, "unsigned long long should be positive");967 return;968 case "float":969 assert_equals(typeof value, "number");970 assert_equals(value, fround(value), "float rounded to 32-bit float should be itself");971 assert_not_equals(value, Infinity);972 assert_not_equals(value, -Infinity);973 assert_not_equals(value, NaN);974 return;975 case "DOMHighResTimeStamp":976 case "double":977 assert_equals(typeof value, "number");978 assert_not_equals(value, Infinity);979 assert_not_equals(value, -Infinity);980 assert_not_equals(value, NaN);981 return;982 case "unrestricted float":983 assert_equals(typeof value, "number");984 assert_equals(value, fround(value), "unrestricted float rounded to 32-bit float should be itself");985 return;986 case "unrestricted double":987 assert_equals(typeof value, "number");988 return;989 case "DOMString":990 assert_equals(typeof value, "string");991 return;992 case "ByteString":993 assert_equals(typeof value, "string");994 assert_regexp_match(value, /^[\x00-\x7F]*$/);995 return;996 case "USVString":997 assert_equals(typeof value, "string");998 assert_regexp_match(value, /^([\x00-\ud7ff\ue000-\uffff]|[\ud800-\udbff][\udc00-\udfff])*$/);999 return;1000 case "object":1001 assert_in_array(typeof value, ["object", "function"], "wrong type: not object or function");1002 return;1003 }1004 if (!(type in this.members))1005 {1006 throw new IdlHarnessError("Unrecognized type " + type);1007 }1008 if (this.members[type] instanceof IdlInterface)1009 {1010 // We don't want to run the full1011 // IdlInterface.prototype.test_instance_of, because that could result1012 // in an infinite loop. TODO: This means we don't have tests for1013 // NoInterfaceObject interfaces, and we also can't test objects that1014 // come from another self.1015 assert_in_array(typeof value, ["object", "function"], "wrong type: not object or function");1016 if (value instanceof Object1017 && !this.members[type].has_extended_attribute("NoInterfaceObject")1018 && type in self)1019 {1020 assert_true(value instanceof self[type], "instanceof " + type);1021 }1022 }1023 else if (this.members[type] instanceof IdlEnum)1024 {1025 assert_equals(typeof value, "string");1026 }1027 else if (this.members[type] instanceof IdlDictionary)1028 {1029 // TODO: Test when we actually have something to test this on1030 }1031 else1032 {1033 throw new IdlHarnessError("Type " + type + " isn't an interface or dictionary");1034 }1035};1036/// IdlObject ///1037function IdlObject() {}1038IdlObject.prototype.test = function()1039{1040 /**1041 * By default, this does nothing, so no actual tests are run for IdlObjects1042 * that don't define any (e.g., IdlDictionary at the time of this writing).1043 */1044};1045IdlObject.prototype.has_extended_attribute = function(name)1046{1047 /**1048 * This is only meaningful for things that support extended attributes,1049 * such as interfaces, exceptions, and members.1050 */1051 return this.extAttrs.some(function(o)1052 {1053 return o.name == name;1054 });1055};1056/// IdlDictionary ///1057// Used for IdlArray.prototype.assert_type_is1058function IdlDictionary(obj)1059{1060 /**1061 * obj is an object produced by the WebIDLParser.js "dictionary"1062 * production.1063 */1064 /** Self-explanatory. */1065 this.name = obj.name;1066 /** A back-reference to our IdlArray. */1067 this.array = obj.array;1068 /** An array of objects produced by the "dictionaryMember" production. */1069 this.members = obj.members;1070 /**1071 * The name (as a string) of the dictionary type we inherit from, or null1072 * if there is none.1073 */1074 this.base = obj.inheritance;1075}1076IdlDictionary.prototype = Object.create(IdlObject.prototype);1077IdlDictionary.prototype.get_inheritance_stack = function() {1078 return IdlInterface.prototype.get_inheritance_stack.call(this);1079};1080/// IdlInterface ///1081function IdlInterface(obj, is_callback, is_mixin)1082{1083 /**1084 * obj is an object produced by the WebIDLParser.js "interface" production.1085 */1086 /** Self-explanatory. */1087 this.name = obj.name;1088 /** A back-reference to our IdlArray. */1089 this.array = obj.array;1090 /**1091 * An indicator of whether we should run tests on the interface object and1092 * interface prototype object. Tests on members are controlled by .untested1093 * on each member, not this.1094 */1095 this.untested = obj.untested;...

Full Screen

Full Screen

webidl2ts.js

Source:webidl2ts.js Github

copy

Full Screen

1// adapted from https://github.com/markandrus/webidl2.js/blob/3d489b89f191f6ea7bda4388419c51b3d82bd169/scripts/typescript.js2import { parse } from "webidl2";3/**4 * @param {string} filepath5 * @returns {string}6 * @throws {Error}7 */8export function webidl2ts(unparsed /* : string */) /* : void */ {9 const idlDefinitions = parse(unparsed);10 const typescript = `${printIDLDefinitions(idlDefinitions)}`;11 return typescript;12}13/**14 * @param {IDLArgument} arg15 * @returns {string}16 */17function printIDLArgument(arg /* : IDLArgument */) /* : string */ {18 return `${arg.name}${arg.optional ? "?" : ""}: ${printIDLType(arg.idlType)}`;19}20/**21 * @param {Array<IDLArgument>} args22 * @returns {string}23 */24function printIDLArguments(args /* : Array<IDLArgument> */) /* : string */ {25 return args.map(printIDLArgument).join(", ");26}27/**28 * @param {IDLAttributeMember} idlAttributeMember29 * @returns {string}30 */31function printIDLAttributeMember(32 idlAttributeMember /* : IDLAttributeMember */33) /* : string */ {34 return ` ${idlAttributeMember.name}: ${printIDLType(35 idlAttributeMember.idlType36 )};`;37}38function printIDLOperationMember(idlMember) {39 let prefix =40 idlMember.special && idlMember.special.value41 ? { getter: "get", setter: "set" }[idlMember.special.value] || ""42 : "";43 return ` ${prefix} ${44 idlMember.body.name ? idlMember.body.name.value : ""45 }(${printIDLArguments(idlMember.body.arguments)}): ${printIDLType(46 idlMember.body.idlType47 )}`;48}49/**50 * @param {IDLDefinition} idlDefinition51 * @returns {?string}52 * @throws {Error}53 */54function printIDLDefinition(55 idlDefinition /* : IDLDefinition */56) /* : ?string */ {57 switch (idlDefinition.type) {58 case "dictionary":59 return printIDLDictionary(idlDefinition);60 case "enum":61 return printIDLEnum(idlDefinition);62 case "interface":63 return printIDLInterface(idlDefinition);64 case "typedef":65 // NOTE(mroberts): WebIDL cannot represent a type which is an empty Array,66 // nor can it represent "pairs" (e.g., an Array of length two); so we67 // special case these here.68 if (69 idlDefinition.name === "EmptyArray" ||70 idlDefinition.name === "PairOfIDLTypes"71 ) {72 return null;73 }74 return printIDLTypedef(idlDefinition);75 case "eof":76 return "";77 default:78 throw new Error(`I don't know how to print ${idlDefinition.type}s`);79 }80}81/**82 * @param {Array<IDLDefinition>} idlDefinitions83 * @returns {string}84 * @throws {Error}85 */86function printIDLDefinitions(87 idlDefinitions /* : Array<IDLDefinition> */88) /* : string */ {89 const typeScriptDefinitions = [];90 for (let idlDefinition of idlDefinitions) {91 const typeScriptDefinition = printIDLDefinition(idlDefinition);92 if (typeScriptDefinition) {93 typeScriptDefinitions.push(typeScriptDefinition);94 }95 }96 return typeScriptDefinitions.join("\n");97}98/**99 * @param {IDLDictionary} idlDictionary100 * @returns {string}101 */102function printIDLDictionary(103 idlDictionary /* : IDLDictionary */104) /* : string */ {105 const n = idlDictionary.members.length;106 return `export type ${idlDictionary.name} = {107${idlDictionary.members108 .map((member, i) => {109 return ` ${member.name}${member.required ? "" : "?"}: ${printIDLType(110 member.idlType111 )}${i === n - 1 ? "" : ","}`;112 })113 .join("\n")}114};115`;116}117/**118 * @param {IDLEnum} idlEnum119 * @returns {string}120 */121function printIDLEnum(idlEnum /* : IDLEnum */) /* : string */ {122 const n = idlEnum.values.length;123 return `export type ${idlEnum.name}124${idlEnum.values125 .map((value, i) => {126 return ` ${i ? "|" : "="} ${JSON.stringify(value)}${127 i === n - 1 ? ";" : ""128 }`;129 })130 .join("\n")}131`;132}133/**134 * @param {IDLInterface} idlInterface135 * @returns {string}136 * @throws {Error}137 */138function printIDLInterface(idlInterface /* : IDLInterface */) /* : string */ {139 const constructor = idlInterface.extAttrs.items.find(extAttr => {140 return extAttr.name === "Constructor";141 });142 let out = `export ${constructor ? "class" : "interface"} ${143 idlInterface.name144 }${145 idlInterface.inheritance ? ` extends ${idlInterface.inheritance}` : ""146 } {\n`;147 if (constructor) {148 out += ` constructor(${printIDLArguments(149 constructor.arguments || []150 )});\n`;151 }152 if (idlInterface.members.length) {153 out += printIDLMembers(idlInterface.members);154 }155 return out + "\n}\n";156}157/**158 * @param {IDLMember} idlMember159 * @returns {string}160 * @throws {Error}161 */162function printIDLMember(idlMember /* : IDLMember */) /* : string */ {163 switch (idlMember.type) {164 case "attribute":165 return printIDLAttributeMember(idlMember);166 case "operation":167 return printIDLOperationMember(idlMember);168 default:169 throw new Error(`I don't know how to print member type: ${idlMember}`);170 }171}172/**173 * @param {IDLMember} idlMembers174 * @returns {string}175 * @throws {Error}176 */177function printIDLMembers(idlMembers /* : Array<IDLMember> */) /* : string */ {178 return idlMembers.map(printIDLMember).join("\n");179}180/**181 * @param {IDLType} idlType182 * @returns {string}183 */184function printIDLType(idlType /* : IDLType */) /* : string */ {185 let before = "";186 let after = "";187 if (idlType.generic) {188 before = `${idlType.generic.value}<` + before;189 after += ">";190 }191 if (idlType.nullable) {192 after += "|null";193 }194 if (typeof idlType.idlType === "string") {195 let type = nativeTypes[idlType.idlType] || idlType.idlType;196 return `${before}${type}${after}`;197 } else if (Array.isArray(idlType.idlType)) {198 return `${before}${idlType.idlType.map(printIDLType).join("|")}${after}`;199 }200 return `${before}${printIDLType(idlType.idlType)}${after}`;201}202const nativeTypes = {203 // NOTE(mroberts): WebIDL cannot represent a type which is an empty Array,204 // nor can it represent "pairs" (e.g., an Array of length two); so we205 // special case these here.206 EmptyArray: "[]",207 PairOfIDLTypes: "[IDLType, IDLType]",208 sequence: "Array"209};210/**211 * @param {IDLTypedef} idlTypedef212 * @returns {string}213 * @throws {Error}214 */215function printIDLTypedef(idlTypedef /* : IDLTypedef */) /* : string */ {216 if (Array.isArray(idlTypedef.idlType.idlType)) {217 const n = idlTypedef.idlType.idlType.length;218 return `export type ${idlTypedef.name}219${idlTypedef.idlType.idlType220 .map((idlType, i) => {221 return ` ${i ? "|" : "="} ${printIDLType(idlType)}${222 i === n - 1 ? ";" : ""223 }`;224 })225 .join("\n")}226`;227 } else if (typeof idlTypedef.idlType.idlType === "string") {228 return `export type ${idlTypedef.name} = ${idlTypedef.idlType.idlType}229`;230 }231 throw new Error(`I only know how to print typedefs for unions`);...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var idl_array = new IdlArray();2idl_array.add_untested_idls("interface TestInterface {};");3idl_array.add_objects({4 TestInterface: ['new TestInterface()']5});6idl_array.test();

Full Screen

Using AI Code Generation

copy

Full Screen

1var wptserve = require('/wptserve.js');2var server = new wptserve.WebServer();3server.router = new wptserve.Router();4server.router.register('/test', function(request, response) {5 var idlInterface = request.idlInterface;6 var idlString = idlInterface('test');7 return idlString;8});9server.start();

Full Screen

Using AI Code Generation

copy

Full Screen

1var idl_test = async_test("Test that IdlInterface method of wptserve works");2idl_test.step(function() {3 assert_own_property(this, "IdlInterface", "IdlInterface method should be present");4 var idl = new IdlInterface("DOMString");5 idl_test.done();6});

Full Screen

Using AI Code Generation

copy

Full Screen

1var test = async_test("Test that the test driver is able to use the IdlInterface method of wptserve");2test.step(function() {3 var idlInterface = IdlInterface("Navigator");4 assert_true(idlInterface !== null, "IdlInterface returns a valid object");5 test.done();6});

Full Screen

Using AI Code Generation

copy

Full Screen

1function run_test()2{3 var testpath = "/test";4 var testInterface = new IdlInterface(testpath);5 var testobj = testInterface.create();6 var testobj2 = testInterface.create();7 var testpath2 = "/test2";8 var testInterface2 = new IdlInterface(testpath2);9 var testobj3 = testInterface2.create();10 do_check_eq(testInterface.path, testpath);11 do_check_neq(testInterface.path, testpath2);12 do_check_eq(testInterface.object, testobj);13 do_check_neq(testInterface.object, testobj2);14 do_check_neq(testInterface.object, testobj3);15 do_check_neq(testInterface2.object, testobj3);16}

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run wpt automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful