tmpvar/jsdom — pull request #689 by F1LT3R (2013-09-27 20:30:26+00:00)
Title: Support HTMLElement.getBoundingClientRect() wuth Dummy Function

This patch lets you call getBoundingClientRect() on any HTML Element with jsdom. It returns an object with zero values.

This should be good enough for most unit tests, that require only the function can be called. The actual values would ideally not matter to a unit test, only a functional test, which would run in the browser anyway.

This is the object that gets returned:

return {
bottom: 0,
height: 0,
left: 0,
right: 0,
top: 0,
width: 0
};