diff --git a/src/Angular.js b/src/Angular.js index 1493cadff..f9f21c37b 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -783,7 +783,9 @@ function arrayRemove(array, value) { * @kind function * * @description - * Creates a deep copy of `source`, which should be an object or an array. + * Creates a deep copy of `source`, which should be an object or an array. This functions is used + * internally, mostly in the change-detection code. It is not intended as an all-purpose copy + * function, and has several limitations (see below). * * * If no destination is supplied, a copy of the object or array is created. * * If a destination is provided, all of its elements (for arrays) or properties (for objects) @@ -800,9 +802,22 @@ function arrayRemove(array, value) { * *
* `angular.copy` does not check if destination and source are of the same type. It's the - * developers responsibility to make sure they are compatible. + * developer's responsibility to make sure they are compatible. *
* + * @knownIssue + * This is a non-exhaustive list of object types / features that are not handled correctly by + * `angular.copy`. Note that since this functions is used by the change detection code, this + * means binding or watching objects of these types (or that include these types) might not work + * correctly. + * - [`ImageData`](https://developer.mozilla.org/docs/Web/API/File) + * - [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map) + * - [`ImageData`](https://developer.mozilla.org/docs/Web/API/ImageData) + * - [`MediaStream`](https://developer.mozilla.org/docs/Web/API/MediaStream) + * - [`WeakMap`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WeakMap) + * - ['getter'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get)/ + * [`setter`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/set)` + * * @param {*} source The source that will be used to make a copy. Can be any type, including * primitives, `null`, and `undefined`. * @param {(Object|Array)=} destination Destination into which the source is copied. If provided,