Author Archives for Tim Down

Empty XHTML tags and Internet Explorer DOM traversal

Posted by Tim Down on October 15th, 2009

Internet Explorer behaviour with HTML and XHTML pages containing empty elements with no end tag such as <span />.

Range.intersectsNode, Mozilla and WebKit

Posted by Tim Down on October 14th, 2008

Today I needed to know whether a Range object (obtained from a selection) intersected with a particular node within an HTML document, which is a relatively common scenario when developing WYSWIYG editors. Mozilla’s implementation of Range used to have a proprietary intersectsNode method, which was ideal. However, they’ve removed this in Gecko 1.9 (and therefore [...]

JavaScript eval in iframes

Posted by Tim Down on January 22nd, 2007

In the course of developing a new version of log4javascript, I was adding a command line feature that required the ability to evaluate and execute code in an iframe from within the main window. Fine, I thought, I’ll just call eval on the iframe window object. Which predictably worked fine in Firefox and Opera 8+, [...]