Top ASP.NET Items

Browse by Tags

All Tags » Opera (RSS)
What's that exception you have here?
Mike Harder found this one that I didn't know about: all exceptions that you may get from the browser are not Error instances. DOMException is an exception that gets thrown when a DOM operation fails, but for some incomprehensible reason it doesn't derive from Error like SyntaxError or TypeError : try { document.createElement( ' ' ); } catch (ex){ alert(ex instanceof Error); } This will alert false. But wait, that's not all. There are other exceptions that derive from DOMException, so in order to handle that exception, you'd want to be able to know if an exception derives from it, something like that: try { document.createElement( ' ' ); } catch (ex){ if (ex instanceof DOMException){ // Do stuff } } Well, if you...
Web development best practices finally made fun
Read More...
OpenAjax requests comments on browser wishlist
The OpenAjax Alliance has been working with some of the top Ajax developers on a wishlist that aims at gathering and prioritizing the development features that we need the most from next generation browsers. The process is completely open and Wiki-based, so feel free to contribute. http://www.openajax.org/blogs/wp-trackback.php?p=53 Read More...
Getting absolute coordinates from a DOM element
For some reason, there is no standard API to get the pixel coordinates of a DOM element relative to the upper-left corner of the document. APIs only exist to get coordinates relative to the offset parent. Problem is, it's very important to get those coordinates for applications such as drag and drop, or whenever you need to compare coordinates of elements that may be in completely different parts of the document. In Microsoft Ajax, we implemented such a function but it proved to be one of the most difficult problems we had to solve. Not so surprisingly, every single browser has its own coordinate quirks that make it almost impossible to get the right results with just capability detection. This is one of the very rare cases where we reluctantly...
D'oh! I guess they didn't think about that one...
Too funny: http://nldd.lordabdul.net//12.html Read More...
More Posts