document Properties Object Properties Summary
Sets or retrieves whether arbitrary variables can be created within an object.
HTML |
N/A |
Script |
document.expando [ = bExpand ] |
true |
Allows the creation of arbitrary variables. |
false |
Disallows the creation of arbitrary variables. |
The property is read/write with a default value of true.
You can extend the properties on an object by creating arbitrary properties with values. The author should be careful, however, because scripting in a case-sensitive language such as JScript® ( compatible with ECMA-262 language specification ) can result in unintentionally setting a property value. For example, if the property value is "borderColor" and the author types the value "borderColor "blue'", the author has just, in fact, created another property on the style object called "borderColor" with the value 'blue'. If the author queries the value of the property, the value "blue" will be returned. However, the borders for the element will not turn blue.
Visual Basic® Scripting Edition ( VBScript ) does not support expando properties on its native language objects, nor will it cause Microsoft® Internet Explorer® to create expandos on its objects. Internet Explorer® supports creation of expandos on its objects, in any language, through setAttribute.
document