| 1 | <html>
|
|---|
| 2 | <head>
|
|---|
| 3 | </head>
|
|---|
| 4 | <body>
|
|---|
| 5 | <script>(function(){
|
|---|
| 6 | var props = {};
|
|---|
| 7 |
|
|---|
| 8 | function addObject(obj) {
|
|---|
| 9 | if (obj == null) return;
|
|---|
| 10 | try {
|
|---|
| 11 | Object.getOwnPropertyNames(obj).forEach(add);
|
|---|
| 12 | } catch(ex) {}
|
|---|
| 13 | if (obj.prototype) {
|
|---|
| 14 | Object.getOwnPropertyNames(obj.prototype).forEach(add);
|
|---|
| 15 | }
|
|---|
| 16 | if (typeof obj == "function") {
|
|---|
| 17 | try {
|
|---|
| 18 | Object.getOwnPropertyNames(new obj).forEach(add);
|
|---|
| 19 | } catch(ex) {}
|
|---|
| 20 | }
|
|---|
| 21 | }
|
|---|
| 22 |
|
|---|
| 23 | function add(name) {
|
|---|
| 24 | if (/^[a-z_$][a-z0-9_$]*$/i.test(name)) {
|
|---|
| 25 | props[name] = true;
|
|---|
| 26 | }
|
|---|
| 27 | }
|
|---|
| 28 |
|
|---|
| 29 | Object.getOwnPropertyNames(window).forEach(function(thing){
|
|---|
| 30 | addObject(window[thing]);
|
|---|
| 31 | });
|
|---|
| 32 |
|
|---|
| 33 | try {
|
|---|
| 34 | addObject(new Event("click"));
|
|---|
| 35 | addObject(new Event("contextmenu"));
|
|---|
| 36 | addObject(new Event("mouseup"));
|
|---|
| 37 | addObject(new Event("mousedown"));
|
|---|
| 38 | addObject(new Event("keydown"));
|
|---|
| 39 | addObject(new Event("keypress"));
|
|---|
| 40 | addObject(new Event("keyup"));
|
|---|
| 41 | addObject(new Event("input"));
|
|---|
| 42 | addObject(new Event("touchstart"));
|
|---|
| 43 | addObject(new Event("touchmove"));
|
|---|
| 44 | addObject(new Event("touchend"));
|
|---|
| 45 | addObject(new Event("touchcancel"));
|
|---|
| 46 | addObject(new Event("pointerdown"));
|
|---|
| 47 | addObject(new Event("pointermove"));
|
|---|
| 48 | addObject(new Event("pointerup"));
|
|---|
| 49 | addObject(new Event("pointercancel"));
|
|---|
| 50 | addObject(new Event("pointerenter"));
|
|---|
| 51 | addObject(new Event("pointerleave"));
|
|---|
| 52 | } catch(ex) {console.error(ex)}
|
|---|
| 53 |
|
|---|
| 54 | try {
|
|---|
| 55 | addObject(Temporal.Duration.from({ years: 1 }));
|
|---|
| 56 | addObject(new Temporal.Instant());
|
|---|
| 57 | addObject(Temporal.Now);
|
|---|
| 58 | addObject(new Temporal.PlainDate(2021, 7, 1));
|
|---|
| 59 | addObject(new Temporal.ZonedDateTime(0n, "America/New_York"));
|
|---|
| 60 | addObject(new Temporal.PlainYearMonth(2021, 7));
|
|---|
| 61 | addObject(new Temporal.PlainTime());
|
|---|
| 62 | addObject(new Temporal.PlainMonthDay(7, 1));
|
|---|
| 63 | addObject(new Temporal.PlainDateTime(2021, 7, 1));
|
|---|
| 64 | } catch(ex) {console.error(ex)}
|
|---|
| 65 |
|
|---|
| 66 | var ta = document.createElement("textarea");
|
|---|
| 67 | ta.style.width = "100%";
|
|---|
| 68 | ta.style.height = "20em";
|
|---|
| 69 | ta.style.boxSizing = "border-box";
|
|---|
| 70 | ta.value = 'export var domprops = ' + JSON.stringify(Object.keys(props).sort(cmp), null, 4);
|
|---|
| 71 | document.body.appendChild(ta);
|
|---|
| 72 |
|
|---|
| 73 | function cmp(a, b) {
|
|---|
| 74 | a = a.toLowerCase();
|
|---|
| 75 | b = b.toLowerCase();
|
|---|
| 76 | return a < b ? -1 : a > b ? 1 : 0;
|
|---|
| 77 | }
|
|---|
| 78 | })();</script>
|
|---|
| 79 | </body>
|
|---|
| 80 | </html>
|
|---|