Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
clone() objects are not retaining properties #88
I noticed this in my own code but you can actually see the effects of this problem in the docs example here:
There is only one black rectangle when there should be two. If the example code is edited so that:
The rectangle will now appear.
The last version broke the clone method in some cases, when the properties were not directly on the object but further up the prototype chain. oCanvas now polyfills the planned ES6 method Object.getPropertyDescriptor to make it look through the prototype chain as well.