From bd9de96ffc3e646e23fbbf5ec2f28aa3ecc2ce9a Mon Sep 17 00:00:00 2001 From: Daniel Lo Nigro Date: Fri, 23 Dec 2011 21:20:49 +1100 Subject: [PATCH] New post: "No errors here" --- _posts/2011-12-23-no-errors-here.md | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 _posts/2011-12-23-no-errors-here.md diff --git a/_posts/2011-12-23-no-errors-here.md b/_posts/2011-12-23-no-errors-here.md new file mode 100644 index 0000000..5bc92b2 --- /dev/null +++ b/_posts/2011-12-23-no-errors-here.md @@ -0,0 +1,41 @@ +--- +title: No errors here +layout: post +author: Daniel15 +authorurl: http://dan.cx/ +--- + +{% highlight javascript %} + + +{% endhighlight %} + +I'm not sure what's worse - The fact that all JavaScript errors are silently ignored, doCallback2 +having three callbacks and doCallback3 having two callbacks, or the use of globals (Callback1, +Callback2, Callback3). The same site had JavaScript functions with names like "foo" and "bar". + +As a side note, an interesting oddity in JavaScript: When you return true in the window.onerror +handler, this prevents the default event handler. This is the opposite to all the other DOM 0 +events (such as onclick), where returning false prevents the default handler.