Best JavaScript code snippet using wpt
GlobalEventHandlers.js
Source:GlobalEventHandlers.js
1"use strict";2const conversions = require("webidl-conversions");3const utils = require("./utils.js");4const impl = utils.implSymbol;5function GlobalEventHandlers() {6 throw new TypeError("Illegal constructor");7}8Object.defineProperty(GlobalEventHandlers, "prototype", {9 value: GlobalEventHandlers.prototype,10 writable: false,11 enumerable: false,12 configurable: false13});14Object.defineProperty(GlobalEventHandlers.prototype, "onabort", {15 get() {16 if (!this || !module.exports.is(this)) {17 throw new TypeError("Illegal invocation");18 }19 return utils.tryWrapperForImpl(this[impl]["onabort"]);20 },21 set(V) {22 if (!this || !module.exports.is(this)) {23 throw new TypeError("Illegal invocation");24 }25 V = utils.tryImplForWrapper(V);26 this[impl]["onabort"] = V;27 },28 enumerable: true,29 configurable: true30});31Object.defineProperty(GlobalEventHandlers.prototype, "onauxclick", {32 get() {33 if (!this || !module.exports.is(this)) {34 throw new TypeError("Illegal invocation");35 }36 return utils.tryWrapperForImpl(this[impl]["onauxclick"]);37 },38 set(V) {39 if (!this || !module.exports.is(this)) {40 throw new TypeError("Illegal invocation");41 }42 V = utils.tryImplForWrapper(V);43 this[impl]["onauxclick"] = V;44 },45 enumerable: true,46 configurable: true47});48Object.defineProperty(GlobalEventHandlers.prototype, "onblur", {49 get() {50 if (!this || !module.exports.is(this)) {51 throw new TypeError("Illegal invocation");52 }53 return utils.tryWrapperForImpl(this[impl]["onblur"]);54 },55 set(V) {56 if (!this || !module.exports.is(this)) {57 throw new TypeError("Illegal invocation");58 }59 V = utils.tryImplForWrapper(V);60 this[impl]["onblur"] = V;61 },62 enumerable: true,63 configurable: true64});65Object.defineProperty(GlobalEventHandlers.prototype, "oncancel", {66 get() {67 if (!this || !module.exports.is(this)) {68 throw new TypeError("Illegal invocation");69 }70 return utils.tryWrapperForImpl(this[impl]["oncancel"]);71 },72 set(V) {73 if (!this || !module.exports.is(this)) {74 throw new TypeError("Illegal invocation");75 }76 V = utils.tryImplForWrapper(V);77 this[impl]["oncancel"] = V;78 },79 enumerable: true,80 configurable: true81});82Object.defineProperty(GlobalEventHandlers.prototype, "oncanplay", {83 get() {84 if (!this || !module.exports.is(this)) {85 throw new TypeError("Illegal invocation");86 }87 return utils.tryWrapperForImpl(this[impl]["oncanplay"]);88 },89 set(V) {90 if (!this || !module.exports.is(this)) {91 throw new TypeError("Illegal invocation");92 }93 V = utils.tryImplForWrapper(V);94 this[impl]["oncanplay"] = V;95 },96 enumerable: true,97 configurable: true98});99Object.defineProperty(GlobalEventHandlers.prototype, "oncanplaythrough", {100 get() {101 if (!this || !module.exports.is(this)) {102 throw new TypeError("Illegal invocation");103 }104 return utils.tryWrapperForImpl(this[impl]["oncanplaythrough"]);105 },106 set(V) {107 if (!this || !module.exports.is(this)) {108 throw new TypeError("Illegal invocation");109 }110 V = utils.tryImplForWrapper(V);111 this[impl]["oncanplaythrough"] = V;112 },113 enumerable: true,114 configurable: true115});116Object.defineProperty(GlobalEventHandlers.prototype, "onchange", {117 get() {118 if (!this || !module.exports.is(this)) {119 throw new TypeError("Illegal invocation");120 }121 return utils.tryWrapperForImpl(this[impl]["onchange"]);122 },123 set(V) {124 if (!this || !module.exports.is(this)) {125 throw new TypeError("Illegal invocation");126 }127 V = utils.tryImplForWrapper(V);128 this[impl]["onchange"] = V;129 },130 enumerable: true,131 configurable: true132});133Object.defineProperty(GlobalEventHandlers.prototype, "onclick", {134 get() {135 if (!this || !module.exports.is(this)) {136 throw new TypeError("Illegal invocation");137 }138 return utils.tryWrapperForImpl(this[impl]["onclick"]);139 },140 set(V) {141 if (!this || !module.exports.is(this)) {142 throw new TypeError("Illegal invocation");143 }144 V = utils.tryImplForWrapper(V);145 this[impl]["onclick"] = V;146 },147 enumerable: true,148 configurable: true149});150Object.defineProperty(GlobalEventHandlers.prototype, "onclose", {151 get() {152 if (!this || !module.exports.is(this)) {153 throw new TypeError("Illegal invocation");154 }155 return utils.tryWrapperForImpl(this[impl]["onclose"]);156 },157 set(V) {158 if (!this || !module.exports.is(this)) {159 throw new TypeError("Illegal invocation");160 }161 V = utils.tryImplForWrapper(V);162 this[impl]["onclose"] = V;163 },164 enumerable: true,165 configurable: true166});167Object.defineProperty(GlobalEventHandlers.prototype, "oncontextmenu", {168 get() {169 if (!this || !module.exports.is(this)) {170 throw new TypeError("Illegal invocation");171 }172 return utils.tryWrapperForImpl(this[impl]["oncontextmenu"]);173 },174 set(V) {175 if (!this || !module.exports.is(this)) {176 throw new TypeError("Illegal invocation");177 }178 V = utils.tryImplForWrapper(V);179 this[impl]["oncontextmenu"] = V;180 },181 enumerable: true,182 configurable: true183});184Object.defineProperty(GlobalEventHandlers.prototype, "oncuechange", {185 get() {186 if (!this || !module.exports.is(this)) {187 throw new TypeError("Illegal invocation");188 }189 return utils.tryWrapperForImpl(this[impl]["oncuechange"]);190 },191 set(V) {192 if (!this || !module.exports.is(this)) {193 throw new TypeError("Illegal invocation");194 }195 V = utils.tryImplForWrapper(V);196 this[impl]["oncuechange"] = V;197 },198 enumerable: true,199 configurable: true200});201Object.defineProperty(GlobalEventHandlers.prototype, "ondblclick", {202 get() {203 if (!this || !module.exports.is(this)) {204 throw new TypeError("Illegal invocation");205 }206 return utils.tryWrapperForImpl(this[impl]["ondblclick"]);207 },208 set(V) {209 if (!this || !module.exports.is(this)) {210 throw new TypeError("Illegal invocation");211 }212 V = utils.tryImplForWrapper(V);213 this[impl]["ondblclick"] = V;214 },215 enumerable: true,216 configurable: true217});218Object.defineProperty(GlobalEventHandlers.prototype, "ondrag", {219 get() {220 if (!this || !module.exports.is(this)) {221 throw new TypeError("Illegal invocation");222 }223 return utils.tryWrapperForImpl(this[impl]["ondrag"]);224 },225 set(V) {226 if (!this || !module.exports.is(this)) {227 throw new TypeError("Illegal invocation");228 }229 V = utils.tryImplForWrapper(V);230 this[impl]["ondrag"] = V;231 },232 enumerable: true,233 configurable: true234});235Object.defineProperty(GlobalEventHandlers.prototype, "ondragend", {236 get() {237 if (!this || !module.exports.is(this)) {238 throw new TypeError("Illegal invocation");239 }240 return utils.tryWrapperForImpl(this[impl]["ondragend"]);241 },242 set(V) {243 if (!this || !module.exports.is(this)) {244 throw new TypeError("Illegal invocation");245 }246 V = utils.tryImplForWrapper(V);247 this[impl]["ondragend"] = V;248 },249 enumerable: true,250 configurable: true251});252Object.defineProperty(GlobalEventHandlers.prototype, "ondragenter", {253 get() {254 if (!this || !module.exports.is(this)) {255 throw new TypeError("Illegal invocation");256 }257 return utils.tryWrapperForImpl(this[impl]["ondragenter"]);258 },259 set(V) {260 if (!this || !module.exports.is(this)) {261 throw new TypeError("Illegal invocation");262 }263 V = utils.tryImplForWrapper(V);264 this[impl]["ondragenter"] = V;265 },266 enumerable: true,267 configurable: true268});269Object.defineProperty(GlobalEventHandlers.prototype, "ondragexit", {270 get() {271 if (!this || !module.exports.is(this)) {272 throw new TypeError("Illegal invocation");273 }274 return utils.tryWrapperForImpl(this[impl]["ondragexit"]);275 },276 set(V) {277 if (!this || !module.exports.is(this)) {278 throw new TypeError("Illegal invocation");279 }280 V = utils.tryImplForWrapper(V);281 this[impl]["ondragexit"] = V;282 },283 enumerable: true,284 configurable: true285});286Object.defineProperty(GlobalEventHandlers.prototype, "ondragleave", {287 get() {288 if (!this || !module.exports.is(this)) {289 throw new TypeError("Illegal invocation");290 }291 return utils.tryWrapperForImpl(this[impl]["ondragleave"]);292 },293 set(V) {294 if (!this || !module.exports.is(this)) {295 throw new TypeError("Illegal invocation");296 }297 V = utils.tryImplForWrapper(V);298 this[impl]["ondragleave"] = V;299 },300 enumerable: true,301 configurable: true302});303Object.defineProperty(GlobalEventHandlers.prototype, "ondragover", {304 get() {305 if (!this || !module.exports.is(this)) {306 throw new TypeError("Illegal invocation");307 }308 return utils.tryWrapperForImpl(this[impl]["ondragover"]);309 },310 set(V) {311 if (!this || !module.exports.is(this)) {312 throw new TypeError("Illegal invocation");313 }314 V = utils.tryImplForWrapper(V);315 this[impl]["ondragover"] = V;316 },317 enumerable: true,318 configurable: true319});320Object.defineProperty(GlobalEventHandlers.prototype, "ondragstart", {321 get() {322 if (!this || !module.exports.is(this)) {323 throw new TypeError("Illegal invocation");324 }325 return utils.tryWrapperForImpl(this[impl]["ondragstart"]);326 },327 set(V) {328 if (!this || !module.exports.is(this)) {329 throw new TypeError("Illegal invocation");330 }331 V = utils.tryImplForWrapper(V);332 this[impl]["ondragstart"] = V;333 },334 enumerable: true,335 configurable: true336});337Object.defineProperty(GlobalEventHandlers.prototype, "ondrop", {338 get() {339 if (!this || !module.exports.is(this)) {340 throw new TypeError("Illegal invocation");341 }342 return utils.tryWrapperForImpl(this[impl]["ondrop"]);343 },344 set(V) {345 if (!this || !module.exports.is(this)) {346 throw new TypeError("Illegal invocation");347 }348 V = utils.tryImplForWrapper(V);349 this[impl]["ondrop"] = V;350 },351 enumerable: true,352 configurable: true353});354Object.defineProperty(GlobalEventHandlers.prototype, "ondurationchange", {355 get() {356 if (!this || !module.exports.is(this)) {357 throw new TypeError("Illegal invocation");358 }359 return utils.tryWrapperForImpl(this[impl]["ondurationchange"]);360 },361 set(V) {362 if (!this || !module.exports.is(this)) {363 throw new TypeError("Illegal invocation");364 }365 V = utils.tryImplForWrapper(V);366 this[impl]["ondurationchange"] = V;367 },368 enumerable: true,369 configurable: true370});371Object.defineProperty(GlobalEventHandlers.prototype, "onemptied", {372 get() {373 if (!this || !module.exports.is(this)) {374 throw new TypeError("Illegal invocation");375 }376 return utils.tryWrapperForImpl(this[impl]["onemptied"]);377 },378 set(V) {379 if (!this || !module.exports.is(this)) {380 throw new TypeError("Illegal invocation");381 }382 V = utils.tryImplForWrapper(V);383 this[impl]["onemptied"] = V;384 },385 enumerable: true,386 configurable: true387});388Object.defineProperty(GlobalEventHandlers.prototype, "onended", {389 get() {390 if (!this || !module.exports.is(this)) {391 throw new TypeError("Illegal invocation");392 }393 return utils.tryWrapperForImpl(this[impl]["onended"]);394 },395 set(V) {396 if (!this || !module.exports.is(this)) {397 throw new TypeError("Illegal invocation");398 }399 V = utils.tryImplForWrapper(V);400 this[impl]["onended"] = V;401 },402 enumerable: true,403 configurable: true404});405Object.defineProperty(GlobalEventHandlers.prototype, "onerror", {406 get() {407 if (!this || !module.exports.is(this)) {408 throw new TypeError("Illegal invocation");409 }410 return utils.tryWrapperForImpl(this[impl]["onerror"]);411 },412 set(V) {413 if (!this || !module.exports.is(this)) {414 throw new TypeError("Illegal invocation");415 }416 V = utils.tryImplForWrapper(V);417 this[impl]["onerror"] = V;418 },419 enumerable: true,420 configurable: true421});422Object.defineProperty(GlobalEventHandlers.prototype, "onfocus", {423 get() {424 if (!this || !module.exports.is(this)) {425 throw new TypeError("Illegal invocation");426 }427 return utils.tryWrapperForImpl(this[impl]["onfocus"]);428 },429 set(V) {430 if (!this || !module.exports.is(this)) {431 throw new TypeError("Illegal invocation");432 }433 V = utils.tryImplForWrapper(V);434 this[impl]["onfocus"] = V;435 },436 enumerable: true,437 configurable: true438});439Object.defineProperty(GlobalEventHandlers.prototype, "oninput", {440 get() {441 if (!this || !module.exports.is(this)) {442 throw new TypeError("Illegal invocation");443 }444 return utils.tryWrapperForImpl(this[impl]["oninput"]);445 },446 set(V) {447 if (!this || !module.exports.is(this)) {448 throw new TypeError("Illegal invocation");449 }450 V = utils.tryImplForWrapper(V);451 this[impl]["oninput"] = V;452 },453 enumerable: true,454 configurable: true455});456Object.defineProperty(GlobalEventHandlers.prototype, "oninvalid", {457 get() {458 if (!this || !module.exports.is(this)) {459 throw new TypeError("Illegal invocation");460 }461 return utils.tryWrapperForImpl(this[impl]["oninvalid"]);462 },463 set(V) {464 if (!this || !module.exports.is(this)) {465 throw new TypeError("Illegal invocation");466 }467 V = utils.tryImplForWrapper(V);468 this[impl]["oninvalid"] = V;469 },470 enumerable: true,471 configurable: true472});473Object.defineProperty(GlobalEventHandlers.prototype, "onkeydown", {474 get() {475 if (!this || !module.exports.is(this)) {476 throw new TypeError("Illegal invocation");477 }478 return utils.tryWrapperForImpl(this[impl]["onkeydown"]);479 },480 set(V) {481 if (!this || !module.exports.is(this)) {482 throw new TypeError("Illegal invocation");483 }484 V = utils.tryImplForWrapper(V);485 this[impl]["onkeydown"] = V;486 },487 enumerable: true,488 configurable: true489});490Object.defineProperty(GlobalEventHandlers.prototype, "onkeypress", {491 get() {492 if (!this || !module.exports.is(this)) {493 throw new TypeError("Illegal invocation");494 }495 return utils.tryWrapperForImpl(this[impl]["onkeypress"]);496 },497 set(V) {498 if (!this || !module.exports.is(this)) {499 throw new TypeError("Illegal invocation");500 }501 V = utils.tryImplForWrapper(V);502 this[impl]["onkeypress"] = V;503 },504 enumerable: true,505 configurable: true506});507Object.defineProperty(GlobalEventHandlers.prototype, "onkeyup", {508 get() {509 if (!this || !module.exports.is(this)) {510 throw new TypeError("Illegal invocation");511 }512 return utils.tryWrapperForImpl(this[impl]["onkeyup"]);513 },514 set(V) {515 if (!this || !module.exports.is(this)) {516 throw new TypeError("Illegal invocation");517 }518 V = utils.tryImplForWrapper(V);519 this[impl]["onkeyup"] = V;520 },521 enumerable: true,522 configurable: true523});524Object.defineProperty(GlobalEventHandlers.prototype, "onload", {525 get() {526 if (!this || !module.exports.is(this)) {527 throw new TypeError("Illegal invocation");528 }529 return utils.tryWrapperForImpl(this[impl]["onload"]);530 },531 set(V) {532 if (!this || !module.exports.is(this)) {533 throw new TypeError("Illegal invocation");534 }535 V = utils.tryImplForWrapper(V);536 this[impl]["onload"] = V;537 },538 enumerable: true,539 configurable: true540});541Object.defineProperty(GlobalEventHandlers.prototype, "onloadeddata", {542 get() {543 if (!this || !module.exports.is(this)) {544 throw new TypeError("Illegal invocation");545 }546 return utils.tryWrapperForImpl(this[impl]["onloadeddata"]);547 },548 set(V) {549 if (!this || !module.exports.is(this)) {550 throw new TypeError("Illegal invocation");551 }552 V = utils.tryImplForWrapper(V);553 this[impl]["onloadeddata"] = V;554 },555 enumerable: true,556 configurable: true557});558Object.defineProperty(GlobalEventHandlers.prototype, "onloadedmetadata", {559 get() {560 if (!this || !module.exports.is(this)) {561 throw new TypeError("Illegal invocation");562 }563 return utils.tryWrapperForImpl(this[impl]["onloadedmetadata"]);564 },565 set(V) {566 if (!this || !module.exports.is(this)) {567 throw new TypeError("Illegal invocation");568 }569 V = utils.tryImplForWrapper(V);570 this[impl]["onloadedmetadata"] = V;571 },572 enumerable: true,573 configurable: true574});575Object.defineProperty(GlobalEventHandlers.prototype, "onloadend", {576 get() {577 if (!this || !module.exports.is(this)) {578 throw new TypeError("Illegal invocation");579 }580 return utils.tryWrapperForImpl(this[impl]["onloadend"]);581 },582 set(V) {583 if (!this || !module.exports.is(this)) {584 throw new TypeError("Illegal invocation");585 }586 V = utils.tryImplForWrapper(V);587 this[impl]["onloadend"] = V;588 },589 enumerable: true,590 configurable: true591});592Object.defineProperty(GlobalEventHandlers.prototype, "onloadstart", {593 get() {594 if (!this || !module.exports.is(this)) {595 throw new TypeError("Illegal invocation");596 }597 return utils.tryWrapperForImpl(this[impl]["onloadstart"]);598 },599 set(V) {600 if (!this || !module.exports.is(this)) {601 throw new TypeError("Illegal invocation");602 }603 V = utils.tryImplForWrapper(V);604 this[impl]["onloadstart"] = V;605 },606 enumerable: true,607 configurable: true608});609Object.defineProperty(GlobalEventHandlers.prototype, "onmousedown", {610 get() {611 if (!this || !module.exports.is(this)) {612 throw new TypeError("Illegal invocation");613 }614 return utils.tryWrapperForImpl(this[impl]["onmousedown"]);615 },616 set(V) {617 if (!this || !module.exports.is(this)) {618 throw new TypeError("Illegal invocation");619 }620 V = utils.tryImplForWrapper(V);621 this[impl]["onmousedown"] = V;622 },623 enumerable: true,624 configurable: true625});626Object.defineProperty(GlobalEventHandlers.prototype, "onmouseenter", {627 get() {628 return utils.tryWrapperForImpl(this[impl]["onmouseenter"]);629 },630 set(V) {631 V = utils.tryImplForWrapper(V);632 this[impl]["onmouseenter"] = V;633 },634 enumerable: true,635 configurable: true636});637Object.defineProperty(GlobalEventHandlers.prototype, "onmouseleave", {638 get() {639 return utils.tryWrapperForImpl(this[impl]["onmouseleave"]);640 },641 set(V) {642 V = utils.tryImplForWrapper(V);643 this[impl]["onmouseleave"] = V;644 },645 enumerable: true,646 configurable: true647});648Object.defineProperty(GlobalEventHandlers.prototype, "onmousemove", {649 get() {650 if (!this || !module.exports.is(this)) {651 throw new TypeError("Illegal invocation");652 }653 return utils.tryWrapperForImpl(this[impl]["onmousemove"]);654 },655 set(V) {656 if (!this || !module.exports.is(this)) {657 throw new TypeError("Illegal invocation");658 }659 V = utils.tryImplForWrapper(V);660 this[impl]["onmousemove"] = V;661 },662 enumerable: true,663 configurable: true664});665Object.defineProperty(GlobalEventHandlers.prototype, "onmouseout", {666 get() {667 if (!this || !module.exports.is(this)) {668 throw new TypeError("Illegal invocation");669 }670 return utils.tryWrapperForImpl(this[impl]["onmouseout"]);671 },672 set(V) {673 if (!this || !module.exports.is(this)) {674 throw new TypeError("Illegal invocation");675 }676 V = utils.tryImplForWrapper(V);677 this[impl]["onmouseout"] = V;678 },679 enumerable: true,680 configurable: true681});682Object.defineProperty(GlobalEventHandlers.prototype, "onmouseover", {683 get() {684 if (!this || !module.exports.is(this)) {685 throw new TypeError("Illegal invocation");686 }687 return utils.tryWrapperForImpl(this[impl]["onmouseover"]);688 },689 set(V) {690 if (!this || !module.exports.is(this)) {691 throw new TypeError("Illegal invocation");692 }693 V = utils.tryImplForWrapper(V);694 this[impl]["onmouseover"] = V;695 },696 enumerable: true,697 configurable: true698});699Object.defineProperty(GlobalEventHandlers.prototype, "onmouseup", {700 get() {701 if (!this || !module.exports.is(this)) {702 throw new TypeError("Illegal invocation");703 }704 return utils.tryWrapperForImpl(this[impl]["onmouseup"]);705 },706 set(V) {707 if (!this || !module.exports.is(this)) {708 throw new TypeError("Illegal invocation");709 }710 V = utils.tryImplForWrapper(V);711 this[impl]["onmouseup"] = V;712 },713 enumerable: true,714 configurable: true715});716Object.defineProperty(GlobalEventHandlers.prototype, "onwheel", {717 get() {718 if (!this || !module.exports.is(this)) {719 throw new TypeError("Illegal invocation");720 }721 return utils.tryWrapperForImpl(this[impl]["onwheel"]);722 },723 set(V) {724 if (!this || !module.exports.is(this)) {725 throw new TypeError("Illegal invocation");726 }727 V = utils.tryImplForWrapper(V);728 this[impl]["onwheel"] = V;729 },730 enumerable: true,731 configurable: true732});733Object.defineProperty(GlobalEventHandlers.prototype, "onpause", {734 get() {735 if (!this || !module.exports.is(this)) {736 throw new TypeError("Illegal invocation");737 }738 return utils.tryWrapperForImpl(this[impl]["onpause"]);739 },740 set(V) {741 if (!this || !module.exports.is(this)) {742 throw new TypeError("Illegal invocation");743 }744 V = utils.tryImplForWrapper(V);745 this[impl]["onpause"] = V;746 },747 enumerable: true,748 configurable: true749});750Object.defineProperty(GlobalEventHandlers.prototype, "onplay", {751 get() {752 if (!this || !module.exports.is(this)) {753 throw new TypeError("Illegal invocation");754 }755 return utils.tryWrapperForImpl(this[impl]["onplay"]);756 },757 set(V) {758 if (!this || !module.exports.is(this)) {759 throw new TypeError("Illegal invocation");760 }761 V = utils.tryImplForWrapper(V);762 this[impl]["onplay"] = V;763 },764 enumerable: true,765 configurable: true766});767Object.defineProperty(GlobalEventHandlers.prototype, "onplaying", {768 get() {769 if (!this || !module.exports.is(this)) {770 throw new TypeError("Illegal invocation");771 }772 return utils.tryWrapperForImpl(this[impl]["onplaying"]);773 },774 set(V) {775 if (!this || !module.exports.is(this)) {776 throw new TypeError("Illegal invocation");777 }778 V = utils.tryImplForWrapper(V);779 this[impl]["onplaying"] = V;780 },781 enumerable: true,782 configurable: true783});784Object.defineProperty(GlobalEventHandlers.prototype, "onprogress", {785 get() {786 if (!this || !module.exports.is(this)) {787 throw new TypeError("Illegal invocation");788 }789 return utils.tryWrapperForImpl(this[impl]["onprogress"]);790 },791 set(V) {792 if (!this || !module.exports.is(this)) {793 throw new TypeError("Illegal invocation");794 }795 V = utils.tryImplForWrapper(V);796 this[impl]["onprogress"] = V;797 },798 enumerable: true,799 configurable: true800});801Object.defineProperty(GlobalEventHandlers.prototype, "onratechange", {802 get() {803 if (!this || !module.exports.is(this)) {804 throw new TypeError("Illegal invocation");805 }806 return utils.tryWrapperForImpl(this[impl]["onratechange"]);807 },808 set(V) {809 if (!this || !module.exports.is(this)) {810 throw new TypeError("Illegal invocation");811 }812 V = utils.tryImplForWrapper(V);813 this[impl]["onratechange"] = V;814 },815 enumerable: true,816 configurable: true817});818Object.defineProperty(GlobalEventHandlers.prototype, "onreset", {819 get() {820 if (!this || !module.exports.is(this)) {821 throw new TypeError("Illegal invocation");822 }823 return utils.tryWrapperForImpl(this[impl]["onreset"]);824 },825 set(V) {826 if (!this || !module.exports.is(this)) {827 throw new TypeError("Illegal invocation");828 }829 V = utils.tryImplForWrapper(V);830 this[impl]["onreset"] = V;831 },832 enumerable: true,833 configurable: true834});835Object.defineProperty(GlobalEventHandlers.prototype, "onresize", {836 get() {837 if (!this || !module.exports.is(this)) {838 throw new TypeError("Illegal invocation");839 }840 return utils.tryWrapperForImpl(this[impl]["onresize"]);841 },842 set(V) {843 if (!this || !module.exports.is(this)) {844 throw new TypeError("Illegal invocation");845 }846 V = utils.tryImplForWrapper(V);847 this[impl]["onresize"] = V;848 },849 enumerable: true,850 configurable: true851});852Object.defineProperty(GlobalEventHandlers.prototype, "onscroll", {853 get() {854 if (!this || !module.exports.is(this)) {855 throw new TypeError("Illegal invocation");856 }857 return utils.tryWrapperForImpl(this[impl]["onscroll"]);858 },859 set(V) {860 if (!this || !module.exports.is(this)) {861 throw new TypeError("Illegal invocation");862 }863 V = utils.tryImplForWrapper(V);864 this[impl]["onscroll"] = V;865 },866 enumerable: true,867 configurable: true868});869Object.defineProperty(GlobalEventHandlers.prototype, "onsecuritypolicyviolation", {870 get() {871 if (!this || !module.exports.is(this)) {872 throw new TypeError("Illegal invocation");873 }874 return utils.tryWrapperForImpl(this[impl]["onsecuritypolicyviolation"]);875 },876 set(V) {877 if (!this || !module.exports.is(this)) {878 throw new TypeError("Illegal invocation");879 }880 V = utils.tryImplForWrapper(V);881 this[impl]["onsecuritypolicyviolation"] = V;882 },883 enumerable: true,884 configurable: true885});886Object.defineProperty(GlobalEventHandlers.prototype, "onseeked", {887 get() {888 if (!this || !module.exports.is(this)) {889 throw new TypeError("Illegal invocation");890 }891 return utils.tryWrapperForImpl(this[impl]["onseeked"]);892 },893 set(V) {894 if (!this || !module.exports.is(this)) {895 throw new TypeError("Illegal invocation");896 }897 V = utils.tryImplForWrapper(V);898 this[impl]["onseeked"] = V;899 },900 enumerable: true,901 configurable: true902});903Object.defineProperty(GlobalEventHandlers.prototype, "onseeking", {904 get() {905 if (!this || !module.exports.is(this)) {906 throw new TypeError("Illegal invocation");907 }908 return utils.tryWrapperForImpl(this[impl]["onseeking"]);909 },910 set(V) {911 if (!this || !module.exports.is(this)) {912 throw new TypeError("Illegal invocation");913 }914 V = utils.tryImplForWrapper(V);915 this[impl]["onseeking"] = V;916 },917 enumerable: true,918 configurable: true919});920Object.defineProperty(GlobalEventHandlers.prototype, "onselect", {921 get() {922 if (!this || !module.exports.is(this)) {923 throw new TypeError("Illegal invocation");924 }925 return utils.tryWrapperForImpl(this[impl]["onselect"]);926 },927 set(V) {928 if (!this || !module.exports.is(this)) {929 throw new TypeError("Illegal invocation");930 }931 V = utils.tryImplForWrapper(V);932 this[impl]["onselect"] = V;933 },934 enumerable: true,935 configurable: true936});937Object.defineProperty(GlobalEventHandlers.prototype, "onstalled", {938 get() {939 if (!this || !module.exports.is(this)) {940 throw new TypeError("Illegal invocation");941 }942 return utils.tryWrapperForImpl(this[impl]["onstalled"]);943 },944 set(V) {945 if (!this || !module.exports.is(this)) {946 throw new TypeError("Illegal invocation");947 }948 V = utils.tryImplForWrapper(V);949 this[impl]["onstalled"] = V;950 },951 enumerable: true,952 configurable: true953});954Object.defineProperty(GlobalEventHandlers.prototype, "onsubmit", {955 get() {956 if (!this || !module.exports.is(this)) {957 throw new TypeError("Illegal invocation");958 }959 return utils.tryWrapperForImpl(this[impl]["onsubmit"]);960 },961 set(V) {962 if (!this || !module.exports.is(this)) {963 throw new TypeError("Illegal invocation");964 }965 V = utils.tryImplForWrapper(V);966 this[impl]["onsubmit"] = V;967 },968 enumerable: true,969 configurable: true970});971Object.defineProperty(GlobalEventHandlers.prototype, "onsuspend", {972 get() {973 if (!this || !module.exports.is(this)) {974 throw new TypeError("Illegal invocation");975 }976 return utils.tryWrapperForImpl(this[impl]["onsuspend"]);977 },978 set(V) {979 if (!this || !module.exports.is(this)) {980 throw new TypeError("Illegal invocation");981 }982 V = utils.tryImplForWrapper(V);983 this[impl]["onsuspend"] = V;984 },985 enumerable: true,986 configurable: true987});988Object.defineProperty(GlobalEventHandlers.prototype, "ontimeupdate", {989 get() {990 if (!this || !module.exports.is(this)) {991 throw new TypeError("Illegal invocation");992 }993 return utils.tryWrapperForImpl(this[impl]["ontimeupdate"]);994 },995 set(V) {996 if (!this || !module.exports.is(this)) {997 throw new TypeError("Illegal invocation");998 }999 V = utils.tryImplForWrapper(V);1000 this[impl]["ontimeupdate"] = V;1001 },1002 enumerable: true,1003 configurable: true1004});1005Object.defineProperty(GlobalEventHandlers.prototype, "ontoggle", {1006 get() {1007 if (!this || !module.exports.is(this)) {1008 throw new TypeError("Illegal invocation");1009 }1010 return utils.tryWrapperForImpl(this[impl]["ontoggle"]);1011 },1012 set(V) {1013 if (!this || !module.exports.is(this)) {1014 throw new TypeError("Illegal invocation");1015 }1016 V = utils.tryImplForWrapper(V);1017 this[impl]["ontoggle"] = V;1018 },1019 enumerable: true,1020 configurable: true1021});1022Object.defineProperty(GlobalEventHandlers.prototype, "onvolumechange", {1023 get() {1024 if (!this || !module.exports.is(this)) {1025 throw new TypeError("Illegal invocation");1026 }1027 return utils.tryWrapperForImpl(this[impl]["onvolumechange"]);1028 },1029 set(V) {1030 if (!this || !module.exports.is(this)) {1031 throw new TypeError("Illegal invocation");1032 }1033 V = utils.tryImplForWrapper(V);1034 this[impl]["onvolumechange"] = V;1035 },1036 enumerable: true,1037 configurable: true1038});1039Object.defineProperty(GlobalEventHandlers.prototype, "onwaiting", {1040 get() {1041 if (!this || !module.exports.is(this)) {1042 throw new TypeError("Illegal invocation");1043 }1044 return utils.tryWrapperForImpl(this[impl]["onwaiting"]);1045 },1046 set(V) {1047 if (!this || !module.exports.is(this)) {1048 throw new TypeError("Illegal invocation");1049 }1050 V = utils.tryImplForWrapper(V);1051 this[impl]["onwaiting"] = V;1052 },1053 enumerable: true,1054 configurable: true1055});1056Object.defineProperty(GlobalEventHandlers.prototype, Symbol.toStringTag, {1057 value: "GlobalEventHandlers",1058 writable: false,1059 enumerable: false,1060 configurable: true1061});1062const iface = {1063 // When an interface-module that implements this interface as a mixin is loaded, it will append its own `.is()`1064 // method into this array. It allows objects that directly implements *those* interfaces to be recognized as1065 // implementing this mixin interface.1066 _mixedIntoPredicates: [],1067 is(obj) {1068 if (obj) {1069 if (utils.hasOwn(obj, impl) && obj[impl] instanceof Impl.implementation) {1070 return true;1071 }1072 for (const isMixedInto of module.exports._mixedIntoPredicates) {1073 if (isMixedInto(obj)) {1074 return true;1075 }1076 }1077 }1078 return false;1079 },1080 isImpl(obj) {1081 if (obj) {1082 if (obj instanceof Impl.implementation) {1083 return true;1084 }1085 const wrapper = utils.wrapperForImpl(obj);1086 for (const isMixedInto of module.exports._mixedIntoPredicates) {1087 if (isMixedInto(wrapper)) {1088 return true;1089 }1090 }1091 }1092 return false;1093 },1094 convert(obj, { context = "The provided value" } = {}) {1095 if (module.exports.is(obj)) {1096 return utils.implForWrapper(obj);1097 }1098 throw new TypeError(`${context} is not of type 'GlobalEventHandlers'.`);1099 },1100 create(constructorArgs, privateData) {1101 let obj = Object.create(GlobalEventHandlers.prototype);1102 obj = this.setup(obj, constructorArgs, privateData);1103 return obj;1104 },1105 createImpl(constructorArgs, privateData) {1106 let obj = Object.create(GlobalEventHandlers.prototype);1107 obj = this.setup(obj, constructorArgs, privateData);1108 return utils.implForWrapper(obj);1109 },1110 _internalSetup(obj) {},1111 setup(obj, constructorArgs, privateData) {1112 if (!privateData) privateData = {};1113 privateData.wrapper = obj;1114 this._internalSetup(obj);1115 Object.defineProperty(obj, impl, {1116 value: new Impl.implementation(constructorArgs, privateData),1117 writable: false,1118 enumerable: false,1119 configurable: true1120 });1121 obj[impl][utils.wrapperSymbol] = obj;1122 if (Impl.init) {1123 Impl.init(obj[impl], privateData);1124 }1125 return obj;1126 },1127 interface: GlobalEventHandlers,1128 expose: {}1129}; // iface1130module.exports = iface;...
EventHandlers.d.ts
Source:EventHandlers.d.ts
1export type EventHandlers = {2 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onabort */3 onAbort? : GlobalEventHandlers['onabort'],4 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onanimationcancel */5 onAnimationCancel? : GlobalEventHandlers['onanimationcancel'],6 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onanimationend */7 onAnimationEnd? : GlobalEventHandlers['onanimationend'],8 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onanimationiteration */9 onAnimationIteration? : GlobalEventHandlers['onanimationiteration'],10 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onanimationstart */11 onAnimationStart? : GlobalEventHandlers['onanimationstart'],12 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onauxclick */13 onAuxClick? : GlobalEventHandlers['onauxclick'],14 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onblur */15 onBlur? : GlobalEventHandlers['onblur'],16 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror */17 onError? : GlobalEventHandlers['onerror'],18 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onfocus */19 onFocus? : GlobalEventHandlers['onfocus'],20 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/oncancel */21 onCancel? : GlobalEventHandlers['oncancel'],22 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/oncanplay */23 onCanPlay? : GlobalEventHandlers['oncanplay'],24 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/oncanplaythrough */25 onCanPlaythrough? : GlobalEventHandlers['oncanplaythrough'],26 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onchange */27 onChange? : GlobalEventHandlers['onchange'],28 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onclick */29 onClick? : GlobalEventHandlers['onclick'],30 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onclose */31 onClose? : GlobalEventHandlers['onclose'],32 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/oncontextmenu */33 onContextMenu? : GlobalEventHandlers['oncontextmenu'],34 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/oncuechange */35 onCueChange? : GlobalEventHandlers['oncuechange'],36 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ondblclick */37 onDblClick? : GlobalEventHandlers['ondblclick'],38 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ondrag */39 onDrag? : GlobalEventHandlers['ondrag'],40 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ondragend */41 onDragEnd? : GlobalEventHandlers['ondragend'],42 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ondragenter */43 onDragEnter? : GlobalEventHandlers['ondragenter'],44 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ondragexit */45 onDragExit? : GlobalEventHandlers['ondragexit'],46 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ondragleave */47 onDragLeave? : GlobalEventHandlers['ondragleave'],48 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ondragover */49 onDragOver? : GlobalEventHandlers['ondragover'],50 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ondragstart */51 onDragStart? : GlobalEventHandlers['ondragstart'],52 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ondrop */53 onDrop? : GlobalEventHandlers['ondrop'],54 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ondurationchange */55 onDurationChange? : GlobalEventHandlers['ondurationchange'],56 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onemptied */57 onEmptied? : GlobalEventHandlers['onemptied'],58 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onended */59 onEnded? : GlobalEventHandlers['onended'],60 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onformdata */61 onFormData? : (this : GlobalEventHandlers, event : Event) => any,62 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ongotpointercapture */63 onGotPointerCapture? : GlobalEventHandlers['ongotpointercapture'],64 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/oninput */65 onInput? : GlobalEventHandlers['oninput'],66 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/oninvalid */67 onInvalid? : GlobalEventHandlers['oninvalid'],68 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onkeydown */69 onKeyDown? : GlobalEventHandlers['onkeydown'],70 /**71 * @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onkeypress72 * @deprecated73 */74 onKeyPress? : GlobalEventHandlers['onkeypress'],75 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onkeyup */76 onKeyUp? : GlobalEventHandlers['onkeyup'],77 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onload */78 onLoad? : GlobalEventHandlers['onload'],79 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onloadeddata */80 onLoadedData? : GlobalEventHandlers['onloadeddata'],81 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onloadedmetadata */82 onLoadedMetadata? : GlobalEventHandlers['onloadedmetadata'],83 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onloadend */84 onLoadEnd? : (this : GlobalEventHandlers, event : Event) => any,85 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onloadstart */86 onLoadStart? : GlobalEventHandlers['onloadstart'],87 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onlostpointercapture */88 onLostPointerCapture? : GlobalEventHandlers['onlostpointercapture'],89 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onmousedown */90 onMouseDown? : GlobalEventHandlers['onmousedown'],91 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onmouseenter */92 onMouseEnter? : GlobalEventHandlers['onmouseenter'],93 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onmouseleave */94 onMouseLeave? : GlobalEventHandlers['onmouseleave'],95 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onmousemove */96 onMouseMove? : GlobalEventHandlers['onmousemove'],97 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onmouseout */98 onMouseOut? : GlobalEventHandlers['onmouseout'],99 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onmouseover */100 onMouseOver? : GlobalEventHandlers['onmouseover'],101 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onmouseup */102 onMouseUp? : GlobalEventHandlers['onmouseup'],103 /**104 * @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onmousewheel105 * @deprecated106 */107 onMouseWheel? : (this : HTMLElement, mouseWheelEvent : MouseWheelEvent) => any,108 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onwheel */109 onWheel? : GlobalEventHandlers['onwheel'],110 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onpause */111 onPause? : GlobalEventHandlers['onpause'],112 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onplay */113 onPlay? : GlobalEventHandlers['onplay'],114 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onplaying */115 onPlaying? : GlobalEventHandlers['onplaying'],116 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onpointerdown */117 onPointerDown? : GlobalEventHandlers['onpointerdown'],118 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onpointermove */119 onPointerMove? : GlobalEventHandlers['onpointermove'],120 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onpointerup */121 onPointerUp? : GlobalEventHandlers['onpointerup'],122 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onpointercancel */123 onPointerCancel? : GlobalEventHandlers['onpointercancel'],124 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onpointerover */125 onPointerOver? : GlobalEventHandlers['onpointerover'],126 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onpointerout */127 onPointerOut? : GlobalEventHandlers['onpointerout'],128 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onpointerenter */129 onPointerEnter? : GlobalEventHandlers['onpointerenter'],130 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onpointerleave */131 onPointerLeave? : GlobalEventHandlers['onpointerleave'],132 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onpointerlockchange */133 onPointerLockChange? : (this : GlobalEventHandlers, event : Event) => any,134 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onpointerlockerror */135 onPointerLockError? : (this : GlobalEventHandlers, event : Event) => any,136 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onprogress */137 onProgress? : GlobalEventHandlers['onprogress'],138 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onratechange */139 onRateChange? : GlobalEventHandlers['onratechange'],140 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onreset */141 onReset? : GlobalEventHandlers['onreset'],142 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onresize */143 onResize? : GlobalEventHandlers['onresize'],144 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onscroll */145 onScroll? : GlobalEventHandlers['onscroll'],146 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onseeked */147 onSeeked? : GlobalEventHandlers['onseeked'],148 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onseeking */149 onSeeking? : GlobalEventHandlers['onseeking'],150 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onselect */151 onSelect? : GlobalEventHandlers['onselect'],152 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onselectstart */153 onSelectStart? : GlobalEventHandlers['onselectstart'],154 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onselectionchange */155 onSelectionChange? : GlobalEventHandlers['onselectionchange'],156 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onshow */157 onShow? : (this : GlobalEventHandlers, event : Event) => any,158 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onstalled */159 onStalled? : GlobalEventHandlers['onstalled'],160 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onsubmit */161 onSubmit? : GlobalEventHandlers['onsubmit'],162 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onsuspend */163 onSuspend? : GlobalEventHandlers['onsuspend'],164 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ontimeupdate */165 onTimeUpdate? : GlobalEventHandlers['ontimeupdate'],166 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onvolumechange */167 onVolumeChange? : GlobalEventHandlers['onvolumechange'],168 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ontouchcancel */169 onTouchCancel? : GlobalEventHandlers['ontouchcancel'],170 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ontouchend */171 onTouchEnd? : GlobalEventHandlers['ontouchend'],172 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ontouchmove */173 onTouchMove? : GlobalEventHandlers['ontouchmove'],174 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ontouchstart */175 onTouchStart? : GlobalEventHandlers['ontouchstart'],176 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ontransitioncancel */177 onTransitionCancel? : GlobalEventHandlers['ontransitioncancel'],178 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ontransitionend */179 onTransitionEnd? : GlobalEventHandlers['ontransitionend'],180 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ontransitionrun */181 onTransitionRun? : GlobalEventHandlers['ontransitionrun'],182 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ontransitionstart */183 onTransitionStart? : GlobalEventHandlers['ontransitionstart'],184 /** @see https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/ontransitionstart */185 onWaiting? : GlobalEventHandlers['onwaiting'],...
Using AI Code Generation
1var wptdriver = require('wptdriver');2wptdriver.globalEventHandlers('test');3var wptdriver = require('wptdriver');4wptdriver.globalEventHandlers('test');5var wptdriver = require('wptdriver');6wptdriver.globalEventHandlers('test');7var wptdriver = require('wptdriver');8wptdriver.globalEventHandlers('test');9var wptdriver = require('wptdriver');10wptdriver.globalEventHandlers('test');11var wptdriver = require('wptdriver');12wptdriver.globalEventHandlers('test');13var wptdriver = require('wptdriver');14wptdriver.globalEventHandlers('test');15var wptdriver = require('wptdriver');16wptdriver.globalEventHandlers('test');17var wptdriver = require('wptdriver');18wptdriver.globalEventHandlers('test');19var wptdriver = require('wptdriver');20wptdriver.globalEventHandlers('test');21var wptdriver = require('wptdriver');22wptdriver.globalEventHandlers('test');23var wptdriver = require('wptdriver');24wptdriver.globalEventHandlers('test');25var wptdriver = require('wptdriver');26wptdriver.globalEventHandlers('test');
Using AI Code Generation
1function test() {2 var page = new WebPage();3 page.onConsoleMessage = function(msg) {4 console.log(msg);5 };6 page.onInitialized = function() {7 page.evaluate(function() {8 function dumpEvent(e) {9 console.log(e.type + " " + e.clientX + " " + e.clientY);10 }11 document.addEventListener("click", dumpEvent, false);12 document.addEventListener("mousedown", dumpEvent, false);13 document.addEventListener("mouseup", dumpEvent, false);14 document.addEventListener("mousemove", dumpEvent, false);15 document.addEventListener("mouseover", dumpEvent, false);16 document.addEventListener("mouseout", dumpEvent, false);17 document.addEventListener("mousewheel", dumpEvent, false);18 document.addEventListener("keypress", dumpEvent, false);19 document.addEventListener("keydown", dumpEvent, false);20 document.addEventListener("keyup", dumpEvent, false);21 document.addEventListener("focus", dumpEvent, false);22 document.addEventListener("blur", dumpEvent, false);23 document.addEventListener("load", dumpEvent, false);24 document.addEventListener("unload", dumpEvent, false);25 document.addEventListener("resize", dumpEvent, false);26 document.addEventListener("scroll", dumpEvent, false);27 document.addEventListener("select", dumpEvent, false);28 document.addEventListener("change", dumpEvent, false);29 document.addEventListener("submit", dumpEvent, false);30 document.addEventListener("reset", dumpEvent, false);31 document.addEventListener("error", dumpEvent, false);32 document.addEventListener("abort", dumpEvent, false);33 document.addEventListener("contextmenu", dumpEvent, false);34 });35 };36 if (status !== "success") {37 console.log("Unable to access network");38 } else {39 page.sendEvent('click', 100, 100);40 page.sendEvent('mousedown', 100, 100);41 page.sendEvent('mouseup', 100, 100);42 page.sendEvent('mousemove', 100, 100);43 page.sendEvent('mouseover', 100, 100);44 page.sendEvent('mouseout', 100, 100);45 page.sendEvent('mousewheel', 100, 100);46 page.sendEvent('keypress', 100, 100);47 page.sendEvent('keydown',
Using AI Code Generation
1function testGlobalEventHandlers() {2 var globalEventHandlers = wpt.globalEventHandlers();3 globalEventHandlers.onabort = function() {4 console.log('abort event fired');5 };6 globalEventHandlers.onbeforeunload = function() {7 console.log('beforeunload event fired');8 };9 globalEventHandlers.onblur = function() {10 console.log('blur event fired');11 };12 globalEventHandlers.onerror = function() {13 console.log('error event fired');14 };15 globalEventHandlers.onfocus = function() {16 console.log('focus event fired');17 };18 globalEventHandlers.onhashchange = function() {19 console.log('hashchange event fired');20 };21 globalEventHandlers.onlanguagechange = function() {22 console.log('languagechange event fired');23 };24 globalEventHandlers.onload = function() {25 console.log('load event fired');26 };27 globalEventHandlers.onmessage = function() {28 console.log('message event fired');29 };30 globalEventHandlers.onoffline = function() {31 console.log('offline event fired');32 };33 globalEventHandlers.ononline = function() {34 console.log('online event fired');35 };36 globalEventHandlers.onpagehide = function() {37 console.log('pagehide event fired');38 };39 globalEventHandlers.onpageshow = function() {40 console.log('pageshow event fired');41 };42 globalEventHandlers.onpopstate = function() {43 console.log('popstate event fired');44 };45 globalEventHandlers.onresize = function() {46 console.log('resize event fired');47 };48 globalEventHandlers.onstorage = function() {49 console.log('storage event fired');50 };51 globalEventHandlers.onunload = function() {52 console.log('unload event fired');53 };54}55function testGlobalEventHandlers() {56 var globalEventHandlers = wpt.globalEventHandlers();57 globalEventHandlers.onabort = function() {58 console.log('abort event fired');59 };60 globalEventHandlers.onbeforeunload = function() {61 console.log('beforeunload event fired');62 };63 globalEventHandlers.onblur = function() {64 console.log('blur event fired');65 };66 globalEventHandlers.onerror = function() {67 console.log('error event fired');68 };69 globalEventHandlers.onfocus = function() {70 console.log('focus event
Using AI Code Generation
1var test = new globalEventHandlers();2test.addEventListener("load", function() {3 alert("load event detected");4}, false);5test.addEventListener("unload", function() {6 alert("unload event detected");7}, false);8test.addEventListener("abort", function() {9 alert("abort event detected");10}, false);11test.addEventListener("error", function() {12 alert("error event detected");13}, false);14test.addEventListener("select", function() {15 alert("select event detected");16}, false);17test.addEventListener("change", function() {18 alert("change event detected");19}, false);20test.addEventListener("submit", function() {21 alert("submit event detected");22}, false);23test.addEventListener("reset", function() {24 alert("reset event detected");25}, false);26test.addEventListener("focus", function() {27 alert("focus event detected");28}, false);29test.addEventListener("blur", function() {30 alert("blur event detected");31}, false);32test.addEventListener("resize", function() {33 alert("resize event detected");34}, false);35test.addEventListener("scroll", function() {36 alert("scroll event detected");37}, false);38test.addEventListener("beforeunload", function() {39 alert("beforeunload event detected");40}, false);41test.addEventListener("hashchange", function() {42 alert("hashchange event detected");43}, false);44test.addEventListener("message", function() {45 alert("message event detected");46}, false);47test.addEventListener("online", function() {48 alert("online event detected");49}, false);50test.addEventListener("offline", function() {51 alert("offline event detected");52}, false);53test.addEventListener("popstate", function() {54 alert("popstate event detected");55}, false);56test.addEventListener("storage", function() {57 alert("storage event detected");58}, false);59test.addEventListener("pagehide", function() {60 alert("pagehide event detected");61}, false);62test.addEventListener("pageshow", function() {63 alert("pageshow event detected");64}, false);65test.addEventListener("mousewheel", function() {66 alert("mousewheel event detected");67}, false);68test.addEventListener("DOMMouseScroll", function() {69 alert("DOMMouseScroll event detected");70}, false);71test.addEventListener("contextmenu", function() {72 alert("contextmenu event detected");73}, false);74test.addEventListener("keydown", function() {75 alert("keydown event detected");76}, false);77test.addEventListener("keypress", function() {78 alert("keypress event detected");79}, false);80test.addEventListener("keyup
Using AI Code Generation
1globalEventHandlers();2globalEventHandlers();3### globalEventHandlers()4#### `globalEventHandlers().on()`5const remove = globalEventHandlers().on((event) => {6 console.log('event', event);7});8#### `globalEventHandlers().off()`9const remove = globalEventHandlers().on((event) => {10 console.log('event', event);11});12remove();13#### `globalEventHandlers().once()`14globalEventHandlers().once((event) => {15 console.log('event', event);16});17#### `globalEventHandlers().emit()`18globalEventHandlers().emit('event', { data: 'some data' });19[MIT](LICENSE)
Using AI Code Generation
1wpt.globalEventHandlers('click', function() {2});3wpt.globalEventHandlers('click', function() {4});5wpt.globalEventHandlers('click', function() {6});7wpt.globalEventHandlers('click', function() {8});9wpt.globalEventHandlers('click', function() {10});11wpt.globalEventHandlers('click', function() {12});13wpt.globalEventHandlers('click', function() {14});15wpt.globalEventHandlers('click', function() {16});17wpt.globalEventHandlers('click', function() {18});19wpt.globalEventHandlers('click', function() {20});
Using AI Code Generation
1wptbApp.globalEventHandlers.tableCreated = function (event) {2 console.log("Table created", event);3};4wptbApp.globalEventHandlers.tableDeleted = function (event) {5 console.log("Table deleted", event);6};7wptbApp.globalEventHandlers.tableUpdated = function (event) {8 console.log("Table updated", event);9};10wptbApp.globalEventHandlers.tableSelected = function (event) {11 console.log("Table selected", event);12};13wptbApp.globalEventHandlers.tableDeselected = function (event) {14 console.log("Table deselected", event);15};16wptbApp.globalEventHandlers.tableRowAdded = function (event) {17 console.log("Table row added", event);18};19wptbApp.globalEventHandlers.tableRowDeleted = function (event) {20 console.log("Table row deleted", event);21};22wptbApp.globalEventHandlers.tableRowSelected = function (event) {23 console.log("Table row selected", event);24};
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.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!