source: trip-planner-front/node_modules/terser/tools/props.html@ 59329aa

Last change on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.4 KB
Line 
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 props[name] = true;
25 }
26
27 Object.getOwnPropertyNames(window).forEach(function(thing){
28 addObject(window[thing]);
29 });
30
31 try {
32 addObject(new Event("click"));
33 addObject(new Event("contextmenu"));
34 addObject(new Event("mouseup"));
35 addObject(new Event("mousedown"));
36 addObject(new Event("keydown"));
37 addObject(new Event("keypress"));
38 addObject(new Event("keyup"));
39 } catch(ex) {}
40
41 var ta = document.createElement("textarea");
42 ta.style.width = "100%";
43 ta.style.height = "20em";
44 ta.style.boxSizing = "border-box";
45 ta.value = 'export var domprops = ' + JSON.stringify(Object.keys(props).sort(cmp), null, 4);
46 document.body.appendChild(ta);
47
48 function cmp(a, b) {
49 a = a.toLowerCase();
50 b = b.toLowerCase();
51 return a < b ? -1 : a > b ? 1 : 0;
52 }
53 })();</script>
54 </body>
55</html>
Note: See TracBrowser for help on using the repository browser.