As a Shape, Canvas.background
duly inherits a .layer
property from Graphic
Perhaps this is a matter of taste, but after a longish debugging session, I have finally tracked a problem down to the discovery that if we query the .layer property of a Shape which is the canvas background, in lieu of the expected null (or perhaps undefined), we trigger a Layer error, and script execution stops.
I think my personal request would be that a polite enquiry after a property value should be rewarded by a null or undefined value rather than an error and the termination of execution. Does that seem sensible ?