fixes #10996 (simplify offset) #726

wants to merge 2 commits into

4 participants

jQuery Foundation member

In all of jQuery's supported browsers, either getBoundingClientRect() or window.webkitConvertPointFromNodeToPage() exists, thereby eliminating the need for the old lengthy getOffset function. Good riddance!

In case anyone is curious, and I know you are, here is the size diff:

jQuery Size - compared to last make
  249938  (-2956) jquery.js
   93290  (-1499) jquery.min.js
   33167   (-470) jquery.min.js.gz
@rwaldron rwaldron commented on an outdated diff Apr 4, 2012
@@ -12,7 +12,8 @@
smarttabs: true,
predef: [
- "DOMParser"
+ "DOMParser",
+ "WebKitPoint",
rwaldron Apr 4, 2012 jQuery Foundation member

I know it's not an issue, really... but drop the trailing comma

jQuery Foundation member

If this is real, I'm impressed.

mikesherov added some commits Dec 25, 2011
@mikesherov mikesherov remove old offset code 4b0e240
@mikesherov mikesherov function parity with getBoundingClientRect
return new object literal in all cases
style and JSHint fixes

Woah, if only there were more pull requests like this! :D

jQuery Foundation member

Landed in 1.8pre: 77536f5

"In recent news, reports that their disk usage decreased significantly thanks to a recent @mikesherov pull request."

@dmethvin dmethvin closed this Apr 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment