diff options
| author | unknown | 2010-07-27 16:53:23 -0700 |
|---|---|---|
| committer | unknown | 2010-07-27 16:53:23 -0700 |
| commit | 6bd8006edcbfe1dc1be8cb865fbcfe25157fe117 (patch) | |
| tree | 72c421ab1e25ff62c24d8e8b8ca39fe823e57ec4 /src/Angular.js | |
| parent | 2a30a02f015dd54846bb62d1f05e82b3cf76ef9f (diff) | |
| download | angular.js-6bd8006edcbfe1dc1be8cb865fbcfe25157fe117.tar.bz2 | |
fix IE native mothods are not functions, and preventDefault
Diffstat (limited to 'src/Angular.js')
| -rw-r--r-- | src/Angular.js | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/Angular.js b/src/Angular.js index 850fe34c..32e3ccf7 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -293,13 +293,18 @@ function escapeAttr(html) { function bind(_this, _function) { var curryArgs = slice.call(arguments, 2, arguments.length); - return curryArgs.length == 0 ? - function() { - return _function.apply(_this, arguments); - } : - function() { - return _function.apply(_this, curryArgs.concat(slice.call(arguments, 0, arguments.length))); - }; + if (typeof _function == 'function') { + return curryArgs.length == 0 ? + function() { + return _function.apply(_this, arguments); + } : + function() { + return _function.apply(_this, curryArgs.concat(slice.call(arguments, 0, arguments.length))); + } + } else { + // in IE, native methonds ore not functions and so they can not be bound (but they don't need to be) + return function(a, b, c, d, e){ return _function(a, b, c, d, e); }; + } } function outerHTML(node) { |
