You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Given a file object, calling angular.copy and trying to access properties like "name" and "size" on the copy will result in a "Invalid calling object" error being thrown in IE 10+. In Firefox, the error is "Illegal operation on WrappedNative prototype object". Tested in angular 1.3 beta 15. (Demo) The problem does not occur in angular 1.1.5 or in Chrome.
The text was updated successfully, but these errors were encountered:
nlwillia
changed the title
IE10+: "Invalid calling object" on properties after angular.copy of a File object
IE10+, Firefox: "Invalid calling object" on properties after angular.copy of a File object
Jul 23, 2014
My recommendation would be to write your own util for copying specific options.
angular.copy's implementation is tailored to Angular's internal needs and implemented with certain performance characteristics in mind. For many cases, this utility works well in application logic, but when you need to retain certain special object characteristics (like some proto chain or non-enumerable property), you should write or use another utility.
Given a file object, calling angular.copy and trying to access properties like "name" and "size" on the copy will result in a "Invalid calling object" error being thrown in IE 10+. In Firefox, the error is "Illegal operation on WrappedNative prototype object". Tested in angular 1.3 beta 15. (Demo) The problem does not occur in angular 1.1.5 or in Chrome.
The text was updated successfully, but these errors were encountered: