aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMihai Bazon <mihai.bazon@gmail.com>2015-03-17 14:31:22 +0200
committerMihai Bazon <mihai.bazon@gmail.com>2015-03-17 14:31:22 +0200
commit7c8c9b94bc5b24a587da8f2c4bac17117fe07490 (patch)
treef50b8883d039d17113d774cd2c30d0045244484c /tools
parentf5eeed7665041145beea2fdfa7f90c2ac559d312 (diff)
downloadtracifyjs-7c8c9b94bc5b24a587da8f2c4bac17117fe07490.tar.gz
tracifyjs-7c8c9b94bc5b24a587da8f2c4bac17117fe07490.zip
tools/props.html: use try/catch in a few more places
Diffstat (limited to 'tools')
-rw-r--r--tools/props.html20
1 files changed, 12 insertions, 8 deletions
diff --git a/tools/props.html b/tools/props.html
index 23d1f7da..ff09a8da 100644
--- a/tools/props.html
+++ b/tools/props.html
@@ -7,7 +7,9 @@
function addObject(obj) {
if (obj == null) return;
- Object.getOwnPropertyNames(obj).forEach(add);
+ try {
+ Object.getOwnPropertyNames(obj).forEach(add);
+ } catch(ex) {}
if (obj.prototype) {
Object.getOwnPropertyNames(obj.prototype).forEach(add);
}
@@ -26,13 +28,15 @@
addObject(window[thing]);
});
- addObject(new Event("click"));
- addObject(new Event("contextmenu"));
- addObject(new Event("mouseup"));
- addObject(new Event("mousedown"));
- addObject(new Event("keydown"));
- addObject(new Event("keypress"));
- addObject(new Event("keyup"));
+ try {
+ addObject(new Event("click"));
+ addObject(new Event("contextmenu"));
+ addObject(new Event("mouseup"));
+ addObject(new Event("mousedown"));
+ addObject(new Event("keydown"));
+ addObject(new Event("keypress"));
+ addObject(new Event("keyup"));
+ } catch(ex) {}
var ta = document.createElement("textarea");
ta.style.width = "100%";