Find Element Position Friday, 4 July 2008
« Prototype.js - A Review | Main | Function.prototype.bind »Most libraries try provide some functionality for finding an element's position, but fail in all but the simplest cases.
I created a test page to demonstrate the libraries' results of finding an element's position and the time it takes for them to succeed or fail.
Test Page
Demos are Not Unit Tests
These two demos don't cover all of the complexities in finding an element's position. I didn't even touch tables. There are also complications with padding and border on HTML root element. Unfortunately, IE8b1 doesn't support CSS on the HTML root element (connect id 354453), so it can't be tested.
APE guards against all of the other problems by having a test suite that tests this function with combinations of these cases.
Technorati Tags: APE JavaScript
