source: imaps-frontend/node_modules/terser/tools/props.html

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 2.0 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 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) {}
53
54 var ta = document.createElement("textarea");
55 ta.style.width = "100%";
56 ta.style.height = "20em";
57 ta.style.boxSizing = "border-box";
58 ta.value = 'export var domprops = ' + JSON.stringify(Object.keys(props).sort(cmp), null, 4);
59 document.body.appendChild(ta);
60
61 function cmp(a, b) {
62 a = a.toLowerCase();
63 b = b.toLowerCase();
64 return a < b ? -1 : a > b ? 1 : 0;
65 }
66 })();</script>
67 </body>
68</html>
Note: See TracBrowser for help on using the repository browser.