Skip to content

Commit

Permalink
Ensure compatibility with jQuery by not overwriting the $ character d…
Browse files Browse the repository at this point in the history
…uring compilation.
  • Loading branch information
Daniel Haehn committed Nov 6, 2012
1 parent 6be5b73 commit 77d6c1e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions X.js
Expand Up @@ -153,6 +153,9 @@ function inject(a, b) {
return a; // return the altered object
}

// make sure we don't overwrite a $ sign to ensure compatibility with jQuery
var $ = window.$;

//
// BROWSER COMPATIBILITY FIXES GO HERE
//
Expand Down Expand Up @@ -339,6 +342,7 @@ bind_shim();
requestAnimationFrame_shim();
arrayBufferSlice_shim();

goog.exportSymbol('$', $);
goog.exportSymbol('Function.prototype.bind', Function.prototype.bind);
goog.exportSymbol('window.requestAnimationFrame', window.requestAnimationFrame);
goog.exportSymbol('window.cancelAnimationFrame', window.cancelAnimationFrame);

0 comments on commit 77d6c1e

Please sign in to comment.