874
edits
(revised to reflect the current COW spec) |
(→COWing Objects: rewording) |
||
| Line 41: | Line 41: | ||
By default, non-function Chrome objects passed into content space are completely opaque: no information can be accessed from them, and no properties can be defined on them. | By default, non-function Chrome objects passed into content space are completely opaque: no information can be accessed from them, and no properties can be defined on them. | ||
When a non-readable property is accessed, its value is <tt>undefined</tt> | When a non-writable property is written to, a security exception will be raised. However, when a non-readable property is accessed, its value is <tt>undefined</tt>: a security exception isn't thrown because we don't want to break code that relies on [http://en.wikipedia.org/wiki/Duck_typing duck typing]. | ||
To bypass this default behavior, individual properties can be exposed by defining a <tt>__exposedProps__</tt> property on the object, like so: | To bypass this default behavior, individual properties can be exposed by defining a <tt>__exposedProps__</tt> property on the object, like so: | ||
edits