<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl" xmlns:html="http://www.w3.org/1999/xhtml">
	<!-- the problem with the following implementation is that the getter enters an endless recursion loop 
	     as it tries to call itself to get its own property. How can I access this private member without invoking the getter? -->	
	<binding id='visibility'>
		<implementation>
			<constructor>
				this.visible = true;
			</constructor>
			<property name="visible">
				<getter>
					return this.visible;
				</getter>
				<setter>
					val = Boolean(val);
					this.style.visibility = (val == false ? 'hidden' : 'visible');
					this.visible = val;
				</setter>
			</property>
		</implementation>
	</binding>

	<!-- the problem with the following implementation is that the property '_visible' is publically 
	     accessible along with the protected 'visible' property -->
	<binding id='visibilityHacked'>
		<implementation>
			<constructor>
				this._visible = true;
			</constructor>
			<property name="visible">
				<getter>
					return this._visible;
				</getter>
				<setter>
					val = Boolean(val);
					this.style.visibility = (val == false ? 'hidden' : 'visible');
					this._visible = val;
				</setter>
			</property>
		</implementation>
	</binding>
</bindings>